2010年8月29日
摘要: [代码]接着回到线段树上来,线段树是建立在线段的基础上,每个结点都代表了一条线段 [a , b]。长度为1的线段成为元线段。非元线段都有两个子结点,左结点代表的线段为[a , (a + b ) / 2],右结点代表的线段为[( a + b ) / 2 , b]。图一就是一棵长度范围为[1 , 10]的线段树。 长度范围为[1 , L] 的一棵线段树的深度为log ( L - 1 ) + 1。这个显... 阅读全文
posted @ 2010-08-29 21:22 MiYu 阅读(625) 评论(0) 推荐(2) 编辑
摘要: MiYu原创, 转帖请注明 : 转载自______________白白の屋题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2642题目描述:[代码]Yifenfei is a romantic guy and he likes to count the stars in the sky.To make the problem easier,we co... 阅读全文
posted @ 2010-08-29 09:30 MiYu 阅读(349) 评论(0) 推荐(0) 编辑