Alice And The Coin Game
CodeChefOpen on judge ↗
A fair is organized in the village. There are N shops in the village fair. All the shops can be classified as a $Bad$ shop or a $Good$ shop. Each shop has certain number of coins ($A_i$) assigned to it. If someone visits a Good shop, they will get $A_i$ coins and if someone visits a Bad shop they will have to deposit $A_i$ coins. A Good shop will have positive $A_i$ (including 0) and a Bad
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