← All problemsSign in

Subaru And Diamonds

Problem Description - A rich man is hosting a contest. He puts a huge bag filled with gold and diamond and coal covered with a chocolate wrapper. Now he says to people to come and test their luck and whatever they get they can keep it. In that town a guy named “Subaru” was living, he thought of giving this a try. Now as he was going to take part in the contest suddenly “Emilia” comes there and sa

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