vj1457 小珍的路径

Vj1457 小珍的路径

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

View Full Document Right Arrow Icon
//±¾Ìâz·ĩβÓпոñ£¡ / //±ÉÈ˵ķ½·¨ //dfs+ÊýÂÛ //dfs ÕÒ×·¾¶ºÍ×z· //ÒòΪz·³¤¶ÈΪż ËùÒÔÿ´Î¸ÄÏàÁÚÁ½ÏΪһ¸öÆæÊýÏîһżÊýÏî ²»»áʹÕû¸ö»·µÄÆæÊýÏîºÍÓëżÊýÏîºÍµÄ²î·¢Éú±ä»¯ //ËùÒÔÖ»Òªµ±ÇÒ½öµ±ÆæÊýÏîºÍÓëżÊýÏîºÍÏàµÈʱ ¸Ã»·ÓпɼÓÐÔ / //dfs ×¢Òâ·ÖÎö¸Ãͼ½á¹¹²¢²»ÊÇÊ÷ ¿ÉÄÜÓл· ËùÒÔÒªÅÐÖØ //ÅÐÖØ×¢Òâ»ØËÝ / const maxn=20; var n,m,lev,lon,maxc,minj,ztot:integer; t:longint; cost,even,tmp:array[0. .maxn] of integer; num,g:array[0. .maxn,0. .maxn] of longint; v:array[0. .maxn] of boolean; function check:boolean; var i:integer; begin for i:=1 to lev do begin if cost[tmp[i]]<cost[even[i]] then exit(true); if cost[tmp[i]]>cost[even[i]] then exit(false); end; end; procedure init; var i,w,x,y:longint; begin readln(n,m,t); for i:=1 to n do read(cost[i]); for i:=1 to m do begin
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

Vj1457 小珍的路径

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