B - Valentine Couples
There are two groups, one of $N$ boys and the other of $N$ girls numbered from $1$ to $N$. You are given two arrays $A$ and $B$ containing $N$ numbers each, denoting the height of boys and girls in the group. You have to form $N$ couples, where each couple will consist of $1$ boy and $1$ girl. Each couple has a **LIKENESS VALUE**, where - **LIKENESS VALUE = height of girl in the couple + height
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