- Prepare
- Algorithms
- Game Theory
- Chocolate Game
- Discussions
Chocolate Game
Chocolate Game
+ 1 comment What does Optimally in the problem description means:
How many continuous subsequences of chocolate piles will Laurel win if both of them play optimally?
For the sequence of 1,1,2 the exmaple said, Laurel will lose but if we play it two different ways, each win in one way: (This assumes 0,0 is a non-decreasing sequence)
Way 1: Initial-> [1, 1, 2] [0, 1, 2] --> Laurel Moved [0, 0, 2] --> Hardy Moved [0, 0, 0] --> Laurel Moved, so Laurel won
Way 2: Initial-> [1, 1, 2] [0, 1, 2] --> Laurel Moved [0, 1, 1] --> Hardy Moved [0, 0, 1] --> Laurel Moved [0, 0, 0] --> Hardy Moved, so Hardy won
I understood from the following comment that 0 is a valid entry of a chocolate pile and derivatively all 0s is the final sequence where the game should stop.
+ 3 comments the following data is supposed to be 32 win
10 1 3 4 4 5 8 9 9 10 10
I counted 25. Some one can told me where i'm wrong ?
+ 0 comments can anyone explain me the problem statement. I didn't understood at all.
+ 0 comments can anyone explain me the problem statement. I didn't understood at all.
+ 0 comments I got stuck in optimally section. how can i implement optimal play of players?
Sort 16 Discussions, By:
Please Login in order to post a comment