vj1069 新年趣事之ç&ordm

Vj1069 新年趣事之ç&ordm

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //prim£¨´íÎóµÄ£© / const maxn=800; maxc=1e9; var n:integer; ans:real; x,y,cost:array[0. .maxn] of real; function dist(i,j:integer):real; begin exit(sqrt(sqr(x[i]-x[j])+sqr(y[i]-y[j]))); end; procedure init; var i:integer; begin readln(n); for i:=1 to n do readln(x[i],y[i]); end; procedure main; var i,j,k:integer; mini,t:real; begin for i:=2 to n do cost[i]:=dist(1,i);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.
Ask a homework question - tutors are online