← All problemsSign in

Chef’s Assignment Trouble

Chef loved playing video games. He bunked a lot of lectures to play games and thus got into defaulters. Due to this he is asked to write defaulter assignments. The teachers gave him $N$ assignments out of which he has to write $X$ assignments compulsorily. Chef being lazy, only wants to write assignments with least number of lines. While he is busy getting scolded for bunking help him in se

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