← All problemsSign in

Chef and Benches

Chef has become a Classroom Coordinator of RECursion,a famous competitve programming club of NIT Durgapur.He is supposed to take a class every week. On the first day he finds that the classroom has N (2 His X (2 NOTE: Only one student can sit on a bench at a time. Input t – the number of test cases, then t test cases follows. * Line 1: Two space-separated integers: N and X * Lines 2..N+1: Line

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