← All problemsSign in

Greedy Harshit

Harshit is a very greedy boy. He was dreaming once and in his dreamland he saw Lord Gaben wanting to play a game with him. In this game, Lord Gaben presented Harshit with N jars containing some gold each of value A(i) (0. These gold jars are kept on a table sequentially and each jar is connected to a gold deposit by a pipe. The amount of gold that flows into each pipe per second is equal to the in

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