比赛 20110724 评测结果 WAWEEEWEEE
题目名称 遥远的距离 最终得分 10
用户昵称 Yoghurt 运行时间 0.000 s
代码语言 Pascal 内存使用 0.00 MiB
提交时间 2011-07-24 11:21:04
显示代码纯文本
{
Problem:
Arithmetic Analysis:
Writer:
Data:
Remark:
AC:
}
program faraway;
const
        filename='faraway';
        maxn=100000;
var
        t,n,m:longint;
        ans:double;
        x0,y0:array[0..maxn] of longint;

procedure solve;
var
        i,j,k:longint;
        dis:double;
begin
        readln(t);
        for i:=1 to t do
        begin
                readln(n,m);
                for j:=1 to n+m do
                        readln(x0[j],y0[j]);
                ans:=0;
                for j:=1 to n+m do
                for k:=i+1 to n+m do
                begin
                        dis:=sqrt(sqr(x0[j]-x0[k])+sqr(y0[j]-y0[k]));
                        if ans<dis then ans:=dis;
                end;
        end;
end;

begin
        assign(input,filename+'.in'); reset(input);
        assign(output,filename+'.out'); rewrite(output);

        solve;
        writeln(ans:0:3);

        close(input); close(output);
end.