Pagini recente » Cod sursa (job #1957191) | Cod sursa (job #2459707) | Cod sursa (job #2689338) | Cod sursa (job #2464008) | Cod sursa (job #710299)
Cod sursa(job #710299)
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 then max:=r;
end;
writeln(max:0:6);
close(output);
end.