UVa 10245

From Algorithmist
Jump to: navigation, search

10245 Closest Pair Problem[edit]

http://online-judge.uva.es/p/v102/10245.html

Summary[edit]

Simple Computational Geometry Problem.

You can use the line-sweep or the divide-and-conquer Closest Pair algorithm to solve.

Hints[edit]

  • Notice that each digit has five block/part.
  • Make sure your output doesn't have any trailing spaces or extra newlines

Input[edit]

3
0 0
10000 10000
20000 20000
5
0 2
6 67
43 71
39 107
189 140
0

Output[edit]

INFINITY
36.2215

Solutions[edit]

C++ Divide-and-Conquer: http://www.lukejduncan.com/2009/11/uva-10245---the-closest-pair-problem.php