Money Heist
CodeChefOpen on judge ↗
Parzival decided to rob a bank which has $N$ treasure chests. $i^{th}$ treasure chest contains $a_i$number of coins, where $1 \leq i \leq N$ . When he reached the bank's vault, he knew he had $K$ minutes to escape from the bank before the Police come to catch him. In $1$ minute Parzival chooses a chest with maximum number of coins (if there are multiple chests with same number of coins then the
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