INTERSECTION
CodeChefOpen on judge ↗
There are two lines of boys and girls. One line consists of 100 boys and another of 100 girls. Given the position of the couples at a and b, give the number of intersection points. Input N – number of couples. N lines follow each having a, b – position of boy and girl in both the lines. Output Number of intersection points. Example Input: 3 1 3 2 4 4 4 Output: 1
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