🏡 index : github.com/captn3m0/codechef.git

---
{"languages_supported":{"0":"NA"},"title":"CPOINT","category":"NA","old_version":true,"problem_code":"CPOINT","tags":{"0":"NA"},"layout":"problem"}
---

<h3> All submissions for this problem are available. </h3><p>Given a set of N integer points on the Cartesian plane. Your task is to find an integer point satisfying its sum of distances to N given points (<b>S</b>) is minimum.
</p>

<h3>Input</h3>
<p>There are several test cases (fifteen at most), each formed as follows:
<ul>
<li>The first line contains a positive integer N (N  2,000).</li>
<li>N lines follow, each containing a pair of integers (each having an absolute value of 10<sup>9</sup> at most) describing coordinates of a given point.</li>
</ul>
The input is ended with N = 0.
</p>

<h3>Output</h3>
<p>For each test case, output on a line a real number (with exactly 6 decimal places) which is the respective minimum sum <b>S</b> found.
</p>

<h3>Example</h3>

<pre>
<b>Input:</b>
3
1 1
2 2
3 3
5
1 4
2 3
5 2
3 5
4 1
0

<b>Output:</b>
2.828427
9.640986
</pre>