Taking Notes
CodeChefOpen on judge ↗
Turing and Shannon, the two champions of last year's Honor Code, are playing a game with the prize money they won. They start with $N$ piles of 1000 rupee notes. The piles initially have $a_1,a_2,\cdots,a_N$ notes respectively. At each move, a player can choose a pile, remove as many notes as he wishes or remove no notes from the pile, and he has to split the remaining pile into two new piles
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