THREETW1 - Connecting three towns (variation)
Given three towns find the point for which the summary distance to all towns is minimal. Wanted are the accurate coordinates ±10-6.
Input
In the first line the number T (T<100) of test cases. Then T lines with the space separated coordinates (integer 0<=x, y<=100) of the three towns.
Output
For each test case the coordinates of the above specified point.
Example
Input: 2
2 2 1 1 2 1
1 0 0 0 2 1 Output: 1.788675 1.211324
1 0
hide comments
ZiYuan:
2011-09-24 23:15:32
Thank you, @HWK. I am done. Last edit: 2011-09-25 01:16:06 |
|
HWK:
2011-09-24 21:37:48
@ZiYuan:
|
|
ZiYuan:
2011-09-24 16:34:50
Weird. I've passed the challenge version, but failed in this one. @HWK, can you tell me the test case I didn't pass? Thank you. (5718652) Last edit: 2011-09-24 16:35:33 |
|
HWK:
2011-09-11 07:52:51
@Manish Jain: E.g. look at the 2nd example. Your answer there is '2 1' not '1 0'. |
|
Manish Jain:
2011-09-10 20:23:33
@HWK:-why i m getting WA??
|
|
[Rampage] Blue.Mary:
2011-08-31 10:03:56
The challenge version of this problem is here: http://www.spoj.pl/problems/THREETWN |
|
HWK:
2011-08-30 10:46:38
@Aurelian Tutuianu:
|
|
HWK:
2011-08-29 18:05:40
@Robin Lee: Thanks! |
|
Robin Lee:
2011-08-29 12:59:01
The rounding issue was clear from the problem statement and does not provide cause to attack the setter. Always print to 1dp more than requested if you have the opportunity. Last edit: 2011-08-29 14:55:56 |
|
HWK:
2011-08-29 11:36:49
@Damian Straszak: 0 0 1 0 5 0 -> 1 0
|
Added by: | HWK |
Date: | 2011-08-25 |
Time limit: | 0.100s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |