← All problemsSign in

Ciel and Ball Guessing Game

Tomya is a girl. She loves Chef Ciel very much. Since Tomya has completed collecting the stamps in Ciel's restaurant, she now challenges the bonus game in her restaurant. There are colored balls in a box. The number of colors is N, and the number of balls color i in the box is Si for i = 1, 2, ..., N initially. At first, Tomya has M coins. And Tomya's aim in this game is to get many coins at t

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