Sheep and Coyotes | 프로그래밍의 벗 PivotOJ
PivotOJ

Sheep and Coyotes

시간 제한: 1000ms메모리 제한: 128MB출처: CCC 2000 SeniorBOJ 6947

문제

A square 10001000 by 10001000 field contains several sheep. A coyote enters the field at some point in the south boundary and proceeds to eat the sheep closest to the point of entry, picking arbitrarily if more than one sheep is equally close. The coyote, being sated, then leaves the field.

Your job is to determine which sheep may be eaten by the coyote.

Assume that the southwest corner of the field is located at (0.00,0.00)(0.00, 0.00), the northwest corner at (0.00,1000.00)(0.00, 1000.00), the northeast corner at (1000.00,1000.00)(1000.00, 1000.00) and the southeast corner at (1000.00,0.00)(1000.00, 0.00).

입력

The first line of input gives the number of sheep, between 11 and 10001000. For each sheep a pair of lines follows, giving its coordinates within the field (between 0.000.00 and 1000.001000.00).

출력

For each sheep that might be eaten print a line The sheep at (x, y) might be eaten. where xx and yy give the location of the sheep to two decimal places. The sheep can be listed in any order in the output.

예제

예제 1

입력
6
100.00
100.00
200.00
150.00
140.00
200.00
100.00
300.00
300.00
300.00
300.00
100.00
출력
The sheep at (100.00, 100.00) might be eaten.
The sheep at (300.00, 100.00) might be eaten.
코드를 제출하려면 로그인하세요.