📄 toj_2847.cpp
字号:
/*2847. How Far Can We Go --------------------------------------------------------------------------------Time Limit: 10.0 Seconds Memory Limit: 65536K Special JudgeTotal Runs: 581 Accepted Runs: 120--------------------------------------------------------------------------------Robby is a bad-tempered child, and he often quarrels or even fights with others. After the quarrelling, he often shouts to his opponent: "Go away from me, as far as possible! I never want to see you again!" When he calms down, he finds that it is an interesting problem in fact: Given the position of all the cities, what's the maximum distance between any pairs of them? InputThe first line of each test case contain an integer N (2 ≤ N ≤ 100000), indicating the number of cities. Then N lines followed, each line contains two numbers Xi and Yi, indicating there is a city at (Xi, Yi). (|Xi|, |Yi| ≤ 107)The input is terminated with N = 0. OutputOutput one number in one line for each test case, indicating the maximum distance. Two digits after decimal point are preserved by rounding.Sample Input40.0 0.0-1.0 -1.00.0 -1.0-1.0 0.00Sample Output1.41Problem Setter: RoBa Note: Special judge problem, you may get "Wrong Answer" when output in wrong format.Source: Tianjin Metropolitan Collegiate Programming Contest 2007*/#include<cstdio>int main(){
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -