← All problemsSign in

Valley of Death

Jack and Angelica are in search of fountain of youth and up ahead is the valley of death. Although they could go around the valley, Blackbeard wants to get the chalices before the Spanish so he forces one of them to go through the valley. To decide who would travel through the valley, Jack and Angelica play a game of stones. The game starts with P piles of stones. The ith pile contains Ni number o

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