vj1391 想越狱的小杉

Vj1391 想越狱的小杉

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

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //spfa ¸Ä //dist [ i ] = max( min( dist [ j ] , g [ j , i ] ) ) g[j,i]>0 / //±ÉÈ˵ÄÎÊÌâ //ÓÃÑ»·¶ÓÁÐ mod ·¨ ÅжÏÌõ¼þÊÇ f<>r » uses math; const maxn=2000; maxp=100000; var n,f,r:integer; dist,q:array[0. .maxn] of longint; g:array[0. .maxn,0. .maxn] of longint; v:array[0. .maxn] of boolean; procedure init; var x,y,z:longint; begin readln(n); read(x,y,z); while x<>0 do begin g[x,y]:=z; read(x,y,z); end; end; procedure spfa;
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

Vj1391 想越狱的小杉

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