问题2588--Stars Couple

2588: Stars Couple

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 MB

题目描述

Can you believe it? After Gardon had solved the problem, Angel accepted him! They were sitting on the lawn, watching the stars. "I still can't believe this!" Gardon said. Angel smiled and said: "The reason why I love you does not rest on of who you are, but on who I am when I am with you." Gardon answered :"In my view, it's not because I'm lonely and it's not because it's the Valentine's Day. It's because when you realize you want to spend the rest of your life with somebody, you want the rest of your life to start as soon as possible!" "Watch the stars! How beautiful!" "Just like your eyes!" Gardon replied. Angel smiled again:" Did you hear about this: one star means one person. When two people fall in love, their stars will be always nearby." "So we are the nearest couple?" Now there is the question. Can you point out which couple of stars is nearest? Besides, can you fingle out which couple are most distant?

输入

Input contains serveral test cases. Each cases starts with a integer N (2<=N<=50,000). Then N lines follow. Each line have two integers Xi and Yi(-10^9

输出

For each case, print the distance of the nearest couple and the most distant couple. Print a blank line after each case.

样例输入 Copy

3
1 1
0 0
0 1

样例输出 Copy

Case 1:
Distance of the nearest couple is 1.000
Distance of the most distant couple is 1.414

提示

Please use scanf instead of cin.

来源/分类

hdu  tyh Recommend