Back to General discussions forum
Great problem, Mathias!
One thing that should be fixed is the example, which lost the minus signs. It should be:
19 -14 -7 22 38 96 -53 -49
Vladimir, thanks a lot for quick check and correction! It's my fault during formatting, of course.
Mathias really provided two problems, the second will show up very soon too. It's completely due to my stupidity and laziness that these problems were delayed for about a month. I'm very sorry.
The matter is Mathias split the code obviously to make it more clear to me but I on contrary reading about generator and checker fall into confused state of mind thinking "advanced checker" ability is necessary and I couldn't remember how it works. So set it aside for a day or two... and got swamped by usual chores, hopefully they'll relax their grip now. And in the end I recollected this instruction about creating checker and got back unto the problem - just to find out that it was not meant to use "advanced" check - only one result always.
How I could be so mistaken? Seemingly I imagined that we want the position in array rather than sum. Very silly.
I wrote down all those lamentations not as an excuse, but as a demonstration how stupid and amnestic I am at times - so please, be sure to ping me again and again if I fall into unresponsiveness!
Thank you for publishing, and I'll try to stick to the suggested checker format going forward :). Hopefully the use of the random number generator has laid the groundwork for more problems with larger inputs in the future ...