Pro.ID21325 TitleSnakes Title链接http://10.20.2.8/oj/exercise/problem?problem_id=21325 AC1 Submit3 Ratio33.33% 时间&空间限制描述Buffalo Bill wishes to cross a 1000×1000 square field. A number of snakes are on the field at various positions, and each snake can strike a particular distance in any direction. Can Bill make the trip without being bitten? 输入Assume that the southwest corner of the field is at (0,0) and the northwest corner at (0,1000). The input consists of a line containing n ≤ 1000, the number of snakes. A line follows for each snake, containing three real numbers: the (x, y) location of the snake and its strike distance. The snake will bite anything that passes closer than this distance from its location. 输出Description Buffalo Bill wishes to cross a 1000×1000 square field. A number of snakes are on the field at various positions, and each snake can strike a particular distance in any direction. Can Bill make the trip without being bitten? Input Assume that the southwest corner of the field is at (0,0) and the northwest corner at (0,1000). The input consists of a line containing n ≤ 1000, the number of snakes. A line follows for each snake, containing three real numbers: the (x, y) location of the snake and its strike distance. The snake will bite anything that passes closer than this distance from its location. Output Bill must enter the field somewhere between the southwest and northwest corner and must leave somewhere between the southeast and northeast corners. If Bill can complete the trip, give coordinates at which he may enter and leave the field. If Bill may enter and leave at several places, give the most northerly. If there is no such pair of positions, print "Bill will be bitten." Sample Input 3 Sample Output Bill enters at (0.00, 1000.00) and leaves at (1000.00, 800.00). Source 样例输入3 样例输出Bill enters at (0.00, 1000.00) and leaves at (1000.00, 800.00). 作者 |