Flippy and Fluffy
CodeChefOpen on judge ↗
Fluffy the squirrel and Flippy the bird are good friends. One day, they decided to play a game with two stacks of coins. There are n coins on each stack. A turn consists of choosing a nonempty stack and taking the coin on top of the stack. Note that one must take a coin each move. The game ends when all the coins have been taken. Fluffy moves first. Each coin has a value ci associated to it. When
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start