← All problemsSign in

2020 Carnival

On the new year eve Chef and his friend Chefu went to the 2020 Carnival.At one of the stalls they saw an interesting game was being played. Both of them were very much excited to play the game and decided to go for it. The game consists of a bowl with chits, numbered from $1$ to $N$. Each time the Host randomly picks out two chits from the bowl ,say $x$ and $y$ ,and add a chit numbered as $a

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