跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F0555. Problem E - Paintball

    ID: 561 传统题 1000ms 128MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>待分类整理状态难度待定难度共享题库高校与竞赛共享题英文题面题目来源题面语言

Problem E - Paintball

题目描述

Problem E - Paintball

You are playing paintball on a 1000x1000 square field. A number of your opponents are on the field hiding behind trees at various positions. Each opponent can fire a paintball a certain distance in any direction. Can you cross the field without being hit by a paintball?

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 opponents. A line follows for each opponent, containing three real numbers: the (x,y) location of the opponent and its firing range. The opponent can hit you with a paintball if you ever pass within his firing range.

You must enter the field somewhere between the southwest and northwest corner and must leave somewhere between the southeast and northeast corners.

If you can complete the trip, output four real numbers with two digits after the decimal place, the coordinates at which you may enter and leave the field, separated by spaces. If you can enter and leave at several places, give the most northerly. If there is no such pair of positions, print the line:
IMPOSSIBLE

样例 1

输入

3
500 500 499
0 0 999
1000 1000 200

输出

0.00 1000.00 1000.00 800.00

题目来源:Waterloo ACM Programming Contest September 26, 2010;FPS 共享题包,题包内第 5 题。保留原作者与原赛事署名。