← All problemsSign in

Poonguzhali and Phishing

While sailing to Ilangai (Sri Lanka), Vanthiyathevan and Poonguzhali decide to do some fishing. They catch $N$ fishes whose sizes are represented by integers and arrange them in a row. Each of them eats a fish from the rightmost end of the row and Poonguzhali starts first. Since both of them are extremely hungry, they aim at eating fishes bigger in size. However, Vanthiyathevan being a former king

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