Canadian Computing Competition: 1998 Stage 2, Day 2, Problem 1
The sport of curling is played in ends. In an end, two teams throw eight rocks each toward a circular target. The centre of the target is called the tee. The team that scores is the team whose rock is closest to the tee. The score for that team is the number of rocks belonging to it that are closer to the tee than any other rock from the opposing team, and no more than six feet from the tee. Rocks within
Assume that the tee is at the location whose coordinates are
Input Specification
The input consists of a line containing an integer
Output Specification
For each end, write a line containing the name of the team that wins (A
or B
) followed by a space followed by its score. If no team wins, write BLANK END
.
Sample Input
1
1.000 1.000
2.000 2.000
3.000 3.000
4.000 4.000
5.000 5.000
6.000 6.000
7.000 7.000
8.000 8.000
0.100 1.000
0.900 -0.900
8.000 -8.000
-7.000 7.000
6.000 5.000
5.000 4.000
4.000 5.000
0.000 0.000
Sample Output
B 3
Comments