Group Assignment
Chef's professor is planning to give his class a group assignment. There are $2N$ students in the class, with distinct roll numbers ranging from $1$ to $2N$. Chef's roll number is $X$. The professor decided to create $N$ groups of $2$ students each. The groups were created as follows: the first group consists of roll numbers $1$ and $2N$, the second group of roll numbers $2$ and $2N - 1$, and so
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