← All problemsSign in

Itz Simple

CodeChefRating 791Open on judge ↗

Ved and Varun are both members of Shaastra’s CnL team this year. While they are equally skilled in programming, they differ in height. Ved’s height is $K$, and Varun’s height is $P$. Both want to watch a movie in OAT from outside the gate, without entering. There are $N$ chairs available outside OAT, each with a height represented as $A_i$. These chairs can be stacked on top of each other to crea

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