← All problemsSign in

Leonard and Pressure Game

Sheldon has invented a driving game which he wants to play with Leonard. Assume Sheldon has a very large cylinder that is open from the top. He fills this cylinder with $N$ type of liquids. Each liquid has some Density $Pi$ and covers $Hi$ height. All the liquids are immiscible and they will remain at the position where they are filled. The first liquid goes on the bottom and next liquid goes ov

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