← All problemsSign in

Ball Game

Two friends, Oj and Bhrigudov, play a very simple game. They have 2 bags in front of them - a red coloured and a blue coloured - each containing some marbles. The rules of the game are as follows : Oj starts first. They take alternate turns. In each turn they have to take out any number of marbles from exactly one of the bags. The player whose turn is the last turn of the game, i.e there are no ma

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start