vj1460 拉力赛

vj1460 拉力赛 - / /dfs...

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

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //dfs ¼Ç¼ʱ¼ä´Á //¼Ç¼·ÃÎʸýáµãµÄʱ¼ä´ÁºÍ·ÃÎÊÍêÒԸýáµãΪÊ÷µÄʱ¼ä´Á //Ôò u ÊÇ v µÄ×æÏȵijäÒªÌõ¼þÊÇ ( tnode[ u ] >= tnode [ v ] ) & ( ttree[ u ] <= ttree[ v ] ) t //¼Ç¼Ê÷½á¹¹Ê± //Éè last [ x ] Ϊ x µÄµ±Ç°×îºóÒ»ÌõÓÐÏò±ßµÄ±àºÅ i //ÿ´Î¶ÁÈë x y t ¼Ç g[ i ].p Ϊ ÉÏÒ»¸ö x µÄÓÐÏò±ßµÄ±àºÅ ¼´ ( last [ x ] ) ͬʱ¸üРlast [ x ] := i Í //¼´°Ñ x µÄËùÓÐÓÐÏò±ß±àºÅͨ¹ý¼Ç¼ǰÇýÁ´ÆðÀ´ ͬʱ¼Çס×îºóÒ»¸ö±àºÅ last [ x ] / const maxn=10000; type node=record p,y:integer; t:int64; end; var n,m,time,tot:longint;
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

vj1460 拉力赛 - / /dfs...

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