← All problemsSign in

Finding Teammate

Snackdown 2019 is coming! Since Snackdown is a contest of teams with up to two members, everyone is looking for a teammate. There are $N$ contestants (numbered $1$ through $N$) who want to participate in Snackdown; let's denote the skill level of the $i$-th contestant by $S_i$. These people want to pair up in $N/2$ teams; each team should consist of two people. Clearly everyone wishes for their t

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