vj1101 &auml;&frac14;&nbsp;&aelig;Ÿ“&ccedil;—…&aelig;Ž&sect;&aring;ˆ&para;

# Vj1101 ä¼ æŸ“ç—…æŽ§åˆ¶

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

//±ÉÈËµÄ·½·¨ //ËÑË÷+×îÓÅ»¯¼ôÖ¦ //Ã¿´ÎÀ©Õ¹ÉÏ´Î´«È¾µÄ½áµã¼ÓÈë¶ÓÁÐ °´¶ÓÁÐÖÐ½áµãµÄ Éî¶È*½áµãÊý ½øÐÐÆÀ¹À ÏÈÉ¾³ý¹À¼Û ´óµÄ ÕâÑùËÑÏÂÈ¥ÄÜµÃµ½Ò»¸ö½ÏºÃµÄ½á¹û //Èç¹ûµ±Ç°¸ÐÈ¾ÈËÊý´óÓÚµ±Ç°×îÓÅ½â ÔòÍË³ö / //±ÉÈËµÄÎÊÌâ //×¢Òâ»ØËÝºóÉ¾³ý±ê¼ÇÎÊÌâ / const maxn=300; var n,p,ans:integer; links,dep,nodes:array[0. .maxn] of integer; f:array[0. .maxn] of longint; son,list:array[0. .maxn,0. .maxn] of integer; link:array[0. .maxn,0. .maxn] of boolean; v:array[0. .maxn] of boolean; function max(x,y:integer):integer; begin if x>=y then exit(x); exit(y); end; procedure sort(k:integer); var i,j,t:integer; begin for i:=1 to list[k,0]-1 do for j:=i+1 to list[k,0] do if f[list[k,i]]<f[list[k,j]] then begin t:=list[k,i]; list[k,i]:=list[k,j]; list[k,j]:=t; end; end; procedure cnt(k:integer); var i:integer; begin v[k]:=true; for i:=1 to n do if not v[i] and link[k,i] then begin

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

Vj1101 ä¼ æŸ“ç—…æŽ§åˆ¶

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

View Full Document
Ask a homework question - tutors are online