Easter Bunnies 2D Are Back
source link: https://www.codeabbey.com/index/task_view/easter-bunnies-2d-are-back
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Easter Bunnies 2D Are Back
Thanks once more to Mathias Kern aka gardengnome
for this "sequel"!
Whatever the 1D Easter Bunnies do,
the 2D Easter Bunnies can do it too! They are going on an egg hunt across a 2D
array of size 166 x 166
.
At each position in the array, between -100
and +100
eggs can be found. The 2D
Easter Bunnies can choose
any rectangular subarray. Once more the question is: what’s the most eggs that the bunnies can collect?
Input:
A single integer X0
that is used as the seed for the Linear Congruential Generator introduced
in the problem 25 - use A=445
, C=700001
and M=2097152
.
Generate the first 166 x 166
values from this sequence and transform each value via
value % 201 - 100
to the desired range from -100
to +100
. The array is filled left to right, top to bottom.
Output: The maximum number of eggs the Easter Bunnies can get.
Recommend
-
252
Google Pixel 2 has a Hidden Easter Egg in Active Edge Settings Google’s latest flagship Pixel smartphones, the
-
84
Please answer these questions before submitting your issue. Thanks! What version of Go are you using (go version)? go version go1.8.1 linux/amd6...
-
113
Easter Egg Errors Add to FavoritesShareEaster Egg Errors
-
63
Hugo 0.38: Date and slug from filenames, multiple content dirs, config from themes, language merge func …
-
30
You may have heard about a game where you shoot birds from a slingshot to destroy targets. Today let's create a simple version of this game with Easter chickens playing the main role and Easter bunnies being the...
-
9
Pinball machines have easter eggs I learned last week that pinball machines have easter eggs, too. It makes sense, given that they have so much electronic stuff going...
-
5
Attack of the Killer Bunnies Posted: 2008-01-15 - Last updated: 2019-06-05 Tagged
-
5
Easter Bunnies 2D Advanced Small modification to previous problem Easter Bunnies 2D by our colleague Mathias Kern.
-
2
Home ...
-
7
Easter Bunnies Are Back Many thanks to Mathias Kern aka gardengnome for this problem! T...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK