Dora and her Blocks
CodeChefOpen on judge ↗
Dora was playing with $2 \cdot N$ blocks and each block had a number written on it. She wants to make **exactly** $N$ pairs of blocks such that: - Each pair contains $2$ blocks. - Each of the $2 \cdot N$ blocks of Dora is used in exactly one pair. - The sum of numbers on the two blocks in every pair is an **even** number. You are given an array $A=[A_1, A_2, \dots, A_{2\cdot N}]$ containing $2 \c
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