Pagini recente » Cod sursa (job #1424908) | Cod sursa (job #2406700) | Cod sursa (job #1904149) | Cod sursa (job #3155727) | Cod sursa (job #710301)
Cod sursa(job #710301)
type vec=record
x:longint;
y:longint;
end;
vector=array[1..100000]of vec;
var v:vector;
n,i:longint;
r,max:real;
procedure sort(l,r:longint;var v:vector);
var i,j:longint;
y:vec;
begin
for i:=l to r-1 do
for j:=i+1 to r do
if v[i].x>v[j].x then
begin
y:=v[i];
v[i]:=v[j];
v[j]:=y;
end else
if (v[i].x=v[j].x)and(v[i].y>v[j].y) then
begin
y:=v[i];
v[i]:=v[j];
v[j]:=y;
end;
end;
begin
assign(input,'cmap.in');reset(input);
assign(output,'cmap.out');rewrite(output);
read(n);
max:=maxlongint;
for i:=1 to n do
begin
read(v[i].x);
read(v[i].y);
end;
sort(1,n,v);
for i:=1 to n-1 do
begin
r:=sqrt(sqr(v[i].x-v[i+1].x)+sqr(v[i].y-v[i+1].y));
if r-max<0.0000001 then max:=r;
end;
writeln(max:0:6);
close(output);
end.