P2994 [USACO10OCT] Dinner Time S

Description

Farmer John's N (1

Input Format

\* Line 1: Two space-separated integers: N and M \* Lines 2..N+1: Line i+1 contains two space separated integers: CX\_i and CY\_i \* Lines N+2..N+M+1: Line j+N+1 contains two space separated integers: SX\_j and SY\_j

Output Format

\* Lines 1..N-M: Line i contains the number of the ith cow that Farmer John should be wary of. The cow numbers should be listed in increasing order.

Explanation/Hint

2 cows: Cow 1 starts at (0, 1) and cow 2 at (1, 0). There is only 1 seat at (1, 10). Cow 1 is closer to the seat than cow 2, so cow 1 will get the only seat.