Alice has 10 candies arranged in a row. Each of them is assigned a "yummy value":
Alice would prefer eating all of them, but her mother wants her to distribute 9 candies to her friends, and she can only eat the one left.
The mechanism to distribute the candies is as follows:
Assuming that Alice distributes the candy optimally, what is the maximum "yummy value" she can save for herself?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The candy with yummy 6 is the 1 with highest yummy left because you can pick 3 behind it. If you pick 3 around a higher yummy you would have another 1 left in front or behind it so you can't hold on to the high yummy because you have to give away 3 consecutive candies