|
||||||||||
Perfect Faceless VoidTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 428 Accepted Submission(s): 165 Problem Description DotA is a popular game now. There is a hero called Faceless Void (Darkterror,FV). The hero has a powerful skill called ˇ°Chronosphereˇ±. This skill is described as follows: FV can create a Time Enchantment that neither the enemy units nor the friend units in it can move except FV himself. We can treat the Time Enchantment as a circle. Any unit which is in the circle or just on the edge of the circle can't move. Now a new Crazy (Imba) version of the game has been issued. In the new version, FV can control the size of the Time Enchantment (the radius of the circle). More bigger the circle is, more mana(magic value, blue) FV costs. What's more, there is a new set about the unit which is just on the edge of the circle: if the unit is an enemy, it must remain stationary. Otherwise, the unit is free of the skill. Certainly, a unit in the circle must remain stationary whether it is an enemy or a friend. Then come the problem, there are n (1 <= n <= 10000) enemy units and m (1 <= m <= 10000) friend units in the two dimensional plane, every unit can be treated as a point which is described by a coordinate (x,y). As a perfect player, FV must make sure that all the n enemy units are affected by the skill and all the m friend units are free of it. In additional, FV should choose a solution that cost least mana. How to set the center of the Time Enchantment and the radius of it? It is ensured that there always exists a solution. Input There are several test cases (about 50). The first line consists of two integers n and m (1<= n, m <= 10000) indicate the number of enemy units and the number of friend units. Then there are n+m lines, first n lines describe the coordinates of the n enemy units, and the last m lines describe the coordinates of the m friend units. Every line contains two real numbers. Output Output the best solution described above. The first line contains two real numbers indicate the coordinate of the center, the second line contains just one real number indicate the radius. The results are exact to 3 decimal places. Sample Input
Sample Output
Source | ||||||||||
|