An Evil Affair
CodeChefOpen on judge ↗
Hansel and Gretel are made to play a not-so-sinister game under the influence of the evil witch's dark magic. The rules are as follows: 1. There are 'n' blocks at the beginning. 2. Each block is composed of a certain amount of chocolates. 3. Hansel initiates and then they take turns alternately at playing the game. 4. In every turn, the player can choose any block and break it into two unequal
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