Lust for Gems
CodeChefOpen on judge ↗
The Barbarian King is playing Clash of Clans. He finds a secret maze in the game filled with a bag of green gems.The given maze is split into N × N cells. All cells does not contains gems, some of them contains greedy goblins who love to steal these gems. If the barbarian king moves to a cell containing bag of gems he takes it but if he moves to a cell containing goblins he loses some gems. Each c
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