TWO SACKS OF HAPPINESS
CodeChefOpen on judge ↗
It is the last day of covid and you are coming back to your home with two empty sacks. On the way to your home, you found Ambani brothers donating all their wealth in form of coins after getting fed up with all the money they have. The coins have both positive and negative values and they are laid down in a line. Now as you don’t want to go with an empty sack so you also decided to take some 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.
Sign in to chat with the tutor and save your progress.
Sign in to start