`
lilisalo
  • 浏览: 1108812 次
文章分类
社区版块
存档分类
最新评论

HDOJ/HDU 3622 二分+2-sat 天津网络赛

 
阅读更多

Bomb Game

Time Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1630Accepted Submission(s): 528


Problem Description
Robbie is playing an interesting computer game. The game field is an unbounded 2-dimensional region. There are N rounds in the game. At each round, the computer will give Robbie two places, and Robbie should choose one of them to put a bomb. The explosion area of the bomb is a circle whose center is just the chosen place. Robbie can control the power of the bomb, that is, he can control the radius of each circle. A strange requirement is that there should be no common area for any two circles. The final score is the minimum radius of all the N circles.
Robbie has cracked the game, and he has known all the candidate places of each round before the game starts. Now he wants to know the maximum score he can get with the optimal strategy.

Input
The first line of each test case is an integer N (2 <= N <= 100), indicating the number of rounds. Then N lines follow. The i-th line contains four integers x1i, y1i, x2i, y2i, indicating that the coordinates of the two candidate places of the i-th round are (x1i, y1i) and (x2i, y2i). All the coordinates are in the range [-10000, 10000].

Output
Output one float number for each test case, indicating the best possible score. The result should be rounded to two decimal places.

Sample Input
2 1 1 1 -1 -1 -1 -1 1 2 1 1 -1 -1 1 -1 -1 1

Sample Output
1.41 1.00

Source
The 35th ACM/ICPC Asia Regional Tianjin Site —— Online Contest

刚开始各种撮啊。。
我的代码:






分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics