CHEF AND EXAMS
CodeChefOpen on judge ↗
NITM has to conduct a exam for students , with N (2 seats in a class. The seats are located along a straight line at positions a1,a2,...,an (0 . His S (2 students didn't studied for the exams and are dependent on cheating to pass the exam. To prevent the students from cheating with each other, College wants to accomodate the students to the seats, such that the minimum distance between any two of
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.
Sign in to chat with the tutor and save your progress.
Sign in to start