Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Language: Flipping Colors
Description A rectangle with sides parallel to the x-y axes and its left-lower corner at (0, 0) is being painted. The rectangle may be thought of as a flat-screen display with almost infinite resolution; initially the entire rectangle is black. Two numbers are given 0 < h, v < 1 and then
Input Input contains multiple cases. The first line of each case contains 4 numbers, the length of the rectangle H, the height of the rectangle V and then the numbers h and v. The next line contains one integer number n, the number of points to consider. The following n lines contain two numbers each, the x and the y coordinate of a point. Output Organize your output as shown in the sample. For each point from input print the color of the point. Sample Input 81 32 0.333333333333 0.5 6 16 30 16 25 16 12.0001 16 11.9999 16 7.987654321 16 7.0123456789 10 10 0.123456789 0.987654321 2 0.432 0.9876 9.432 0.9876 0 0 0 0 Sample Output Case 1: black black white black white white Case 2: white black Source |
[Submit] [Go Back] [Status] [Discuss]
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator