← All problemsSign in

Apples and Oranges

CodeChefRating 2947Open on judge ↗

Merlin likes apples and oranges a lot — after all, who doesn't! One day, Merlin bought $N$ apples and $M$ oranges. However, on his way home, a magical force made him fall and the fruits were scattered on the floor (a 2D plane). For each fruit, you are given its coordinates $(x, y)$ on the plane. To investigate this issue, Merlin hired you to separate the apples from the oranges by drawing a strai

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