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
HWK:
2011-08-29 11:36:49
@Aurelian Tutuianu:
|
|
Aurelian Tutuianu:
2011-08-29 11:36:49
@hwk: I consider that the problem should consist only in algorithm, not in a silly formatting thing. Especially when the formatting rules are not specified. I don't want to waste time to guess what rounding to apply. Perhaps you should better specify rounding rules in the problem statement.
|
|
Damian Straszak:
2011-08-29 11:36:49
What is the answer for 0 0 1 0 5 0?
|
|
HWK:
2011-08-29 11:36:49
@Pranay: Look at the last comment.
|
|
Pranay:
2011-08-29 11:36:49
@hwk: is the sum of the lenghts minimum or each individual length?
|
|
HWK:
2011-08-29 11:36:49
@Oleg: Why have you removed your question and my answer?
|
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 |