vj1362 树网的核

Vj1362 树网的核

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // //dfs // O(n^2) dfs ( ) //() // / // // const maxn=300; var n,s,m,dia,p,q,tn,ans:integer; d,tot:array[0..maxn] of integer; node,g,pre:array[0..maxn,0..maxn] of integer; v:array[0..maxn] of boolean; function min(x,y:integer):integer; begin if x<=y then exit(x) else exit(y); end; function max(x,y:integer):integer; begin if x>=y then exit(x) else exit(y); end; procedure init;...
View Full 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

Vj1362 树网的核

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