← All problemsSign in

Seating Arrangement

Chef got appointed as a new algorithms teacher in the university. He was assigned a batch of M students. Now after 2 months of teaching he wants to conduct a test, as he knows that students may cheat in the exam he decided to let all students sit in a single row of N chairs each chair is placed at some distance from each other. Now as there are limited seats and he wants to minimize cheating chef

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