← All problemsSign in

Gold Rush

In a game there are $M$ boxes, each containing $A_j$ grams of gold. In a turn, $N$ chains are kept on the ground with $L_i$ and $R_i$ denoting the coordinates of the left and right end of the $i^{th}$ chain. You are allowed to lock at most one box of gold in each turn. To lock a box containing $A_j$ grams of gold, you need a chain of thickness $P$ and length at least $A_j$. To get a thickness of $

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