vj1406 &aring;&curren;&eacute;Ÿ&micro;&auml;&sup1;‹&eacute;&sup1;Š&aelig;&iexcl;&yen;&ccedil;›&cedi

# Vj1406 å¤éŸµä¹‹é¹Šæ¡¥ç›&cedi

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

//±ÉÈËµÄ·½·¨ //ÏàÁÚÍ¬×ÖÄ¸Á¬½ÓÈ¨ÖµÎª 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;

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 / 2

Vj1406 å¤éŸµä¹‹é¹Šæ¡¥ç›&cedi

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

View Full Document
Ask a homework question - tutors are online