| <p> |
| Some progress bars fill you with anticipation. |
| Some are finished before you know it and make you wonder why there was a progress bar at all. |
| </p> |
|
|
| <p> |
| Some progress bars progress at a pleasant, steady rate. |
| Some are chaotic, lurching forward and then pausing for long periods. |
| Some seem to slow down as they go, never quite reaching 100%. |
| </p> |
|
|
| <p> |
| Some progress bars are in fact not bars at all, but circles. |
| </p> |
|
|
| <p> |
| On your screen is a progress pie, a sort of progress bar that shows its progress as a sector of a circle. |
| Envision your screen as a square on the plane with its bottom-left corner at (0, 0), and its upper-right corner at (100, 100). |
| Every point on the screen is either white or black. |
| Initially, the progress is 0%, and all points on the screen are white. When the progress percentage, <strong>P</strong>, is greater than 0%, a sector of angle (<strong>P</strong>% * 360) degrees |
| is colored black, anchored by the line segment from the center of the square to the center of the top side, and proceeding clockwise. |
| </p> |
|
|
| <img src="{{PHOTO_ID:592385891651966}}" /> |
|
|
| <p> |
| While you wait for the progress pie to fill in, you find yourself thinking about whether certain points would be white or black at different amounts of progress. |
| </p> |
|
|
|
|
| <h3>Input</h3> |
|
|
| <p> |
| Input begins with an integer <strong>T</strong>, the number of points you're curious about. |
| For each point, there is a line containing three space-separated integers, <strong>P</strong>, the amount of progress as a percentage, |
| and <strong>X</strong> and <strong>Y</strong>, the coordinates of the point. |
| </p> |
|
|
| <h3>Output</h3> |
|
|
| <p> |
| For the <strong>i</strong>th point, print a line containing "Case #<strong>i</strong>: " followed by the color of the point, either |
| "black" or "white". |
| </p> |
|
|
| <h3>Constraints</h3> |
|
|
| <p> |
| 1 ≤ <strong>T</strong> ≤ 1,000 <br /> |
| 0 ≤ <strong>P</strong>, <strong>X</strong>, <strong>Y</strong> ≤ 100 <br /> |
| </p> |
|
|
| <p> |
| Whenever a point (<strong>X</strong>, <strong>Y</strong>) is queried, it's guaranteed that all points within a distance of 10<sup>-6</sup> of |
| (<strong>X</strong>, <strong>Y</strong>) are the same color as (<strong>X</strong>, <strong>Y</strong>). |
| </p> |
|
|
|
|
| <h3>Explanation of Sample</h3> |
|
|
| <p> |
| In the first case all of the points are white, so the point at (55, 55) is of course white. |
| </p> |
|
|
| <p> |
| In the second case, (55, 55) is close to the filled-in sector of the circle, but it's still white. |
| </p> |
|
|
| <p> |
| In the third case, the filled-in sector of the circle now covers (55, 55), coloring it black. |
| </p> |
|
|
|
|