vj1119 Car&ccedil;š„&aelig;—…&egrave;&iexcl;Œ&egrave;&middot;&macr;&ccedil;&ordm;&iquest;

# Vj1119 Carçš„æ—…è¡Œè·¯çº¿

This preview shows pages 1–2. Sign up to view the full content.

//dijkstra //½¨Í¼·Ö³ÇÄÚºÍ³ÇÍâ ÕÒ¾ØÐÎµÚËÄ¸ö¶¥µãÓÃµã»ý ¿´ÄÄÁ½Ìõ±ßÊÇ´¹Ö±µÄ ºóÔÙ×öÏòÁ¿¼Ó·¨µÃµÚËÄµã×ø±ê º //Ð´Ëã·¨ÒªÐ´Æ½Ê±Ð´ÊìÁ·µÄ ±ðÁÙÊ±Íæ¸Ä¶¯ / const maxn=400; var n,s,t,numa,numb:integer; ans:real; f:array[0. .maxn,0. .maxn] of real; x,y:array[0. .maxn] of integer; cost:array[0. .maxn] of real; v:array[0. .maxn] of boolean; function min(x,y:real):real; begin if x<y then exit(x); exit(y); end; function min(x,y,z:integer):integer; begin if (x<=y) and (x<=z) then exit(x); if (y<=x) and (y<=z) then exit(y); exit(z); end; function max(x,y,z:integer):integer; begin if (x>=y) and (y>=z) then exit(x); if (y>=x) and (y>=z) then exit(y); exit(z); end; function dist(i,j:integer):real; begin exit(sqrt(sqr(x[i]-x[j])+sqr(y[i]-y[j]))); end; function calc(i,j,k:integer):integer; begin exit((x[j]-x[i])*(y[j]-y[i])+(x[k]-x[i])*(y[k]-y[i])); end; procedure init; var i,j,k,ti:integer;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

### Page1 / 3

Vj1119 Carçš„æ—…è¡Œè·¯çº¿

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online