Game of Toys
CodeChefOpen on judge ↗
Brainy Smurf and Clumsy Smurf are fond of toys. One day, tired of playing from same toys again and again, they decided to play a new game. In this game they arranged N toys (T1, T2,..., TN) in a row and selected a number K. Brainy starts the game and they alternate turn. In their turn they can select any 'continuous' sequence of K toys from the current toy sequence and remove them (see note). The
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