vj1406 古韵之鹊桥ç›&cedi

Vj1406 古韵之鹊桥ç›&cedi

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

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //ÏàÁÚͬ×ÖĸÁ¬½ÓȨֵΪ 0 ÏàÁÚ²»Í¬×ÖĸΪ 1 È»ºó´Óö¾ÙµÚÒ»²ã ÕÒ µ½×îºóÒ»²ãµÄ×î¶Ì· µ //´óÅ£µÄºÃ·½·¨ //floodfill ÊÕËõͼ È»ºóÔÙÇó×î¶Ì· / const maxn=21; d:array[1. .4,0. .1] of integer=((0,-1),(0,1),(1,0),(-1,0)); var n,m,ans:integer; map:array[0. .maxn,0. .maxn] of char; g:array[0. .maxn*maxn,0. .maxn*maxn] of integer; dist:array[0. .maxn*maxn] of integer; v:array[0. .maxn*maxn] of boolean; procedure init; var ch:char; i,j:integer; begin readln(m,n); for i:=1 to m do begin for j:=1 to n do read(map[i,j]); readln; end; end; procedure dijk(ov:integer); var i,j,k,mini:integer; begin fillchar(v,sizeof(v),false); for i:=1 to m*n do dist[i]:=maxint; dist[ov]:=0; for i:=1 to m*n-1 do begin mini:=maxint;
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
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 / 2

Vj1406 古韵之鹊桥ç›&cedi

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online