Problem #332
✰ - click to bookmark
★ - in your bookmarks
Tags:
unlabeled
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.