← All problemsSign in

Exam

In an exam, there are N students which appeared for it and got N marks. The teacher now wants to play a game with the students after calling out their marks. She told one student to write the sum of marks of each pair of students on a paper and sort it and then find the Kth smallest pair sum. The student did as he was told and he was offered a chocolate. Lets see if you deserve a chocolate or not.

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