随笔分类 -  动态树LCT

HDU 4718 The LCIS on the Tree (动态树LCT)
摘要:The LCIS on the TreeTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 175Accepted Submission(s): 40Problem DescriptionFor a sequence S1, S2, ... , SN, and a pair of integers (i, j), if 1 9 #include 10 #include 11 #include 12 #include 13 #includ... 阅读全文

posted @ 2013-09-13 22:33 kuangbin 阅读(1806) 评论(0) 推荐(0)

BZOJ 2002: [Hnoi2010]Bounce 弹飞绵羊 (动态树LCT)
摘要:2002: [Hnoi2010]Bounce 弹飞绵羊Time Limit:10 SecMemory Limit:259 MBSubmit:2843Solved:1519[Submit][Status]Description某天,Lostmonkey发明了一种超级弹力装置,为了在他的绵羊朋友面前显摆,他邀请小绵羊一起玩个游戏。游戏一开始,Lostmonkey在地上沿着一条直线摆上n个装置,每个装置设定初始弹力系数ki,当绵羊达到第i个装置时,它会往后弹ki步,达到第i+ki个装置,若不存在第i+ki个装置,则绵羊被弹飞。绵羊想知道当它从第i个装置起步时,被弹几次后会被弹飞。为了使得游戏更有趣, 阅读全文

posted @ 2013-09-04 08:28 kuangbin 阅读(3001) 评论(0) 推荐(1)

HDU 4010 Query on The Trees (动态树)
摘要:Query on The TreesTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 1527Accepted Submission(s): 747Problem DescriptionWe have met so many problems on the tree, so today we will have a query problem on a set of trees.There are N nodes, each node will 阅读全文

posted @ 2013-09-04 01:43 kuangbin 阅读(2595) 评论(10) 推荐(0)

SPOJ 375. Query on a tree (动态树)
摘要:375. Query on a treeProblem code: QTREEYou are given a tree (an acyclic undirected connected graph) withNnodes, and edges numbered 1, 2, 3...N-1.We will ask you to perfrom some instructions of the following form:CHANGE i ti: change the cost of the i-th edge to tiorQUERY a b: ask for the maximum edge 阅读全文

posted @ 2013-09-04 00:10 kuangbin 阅读(1622) 评论(0) 推荐(0)

BZOJ 2049: [Sdoi2008]Cave 洞穴勘测 (动态树入门)
摘要:2049: [Sdoi2008]Cave 洞穴勘测Time Limit:10 SecMemory Limit:259 MBSubmit:1528Solved:644[Submit][Status]Description辉辉热衷于洞穴勘测。某天,他按照地图来到了一片被标记为JSZX的洞穴群地区。经过初步勘测,辉辉发现这片区域由n个洞穴(分别编号为1到n)以及若干通道组成,并且每条通道连接了恰好两个洞穴。假如两个洞穴可以通过一条或者多条通道按一定顺序连接起来,那么这两个洞穴就是连通的,按顺序连接在一起的这些通道则被称之为这两个洞穴之间的一条路径。洞穴都十分坚固无法破坏,然而通道不太稳定,时常因为外 阅读全文

posted @ 2013-09-03 23:32 kuangbin 阅读(2990) 评论(0) 推荐(1)

导航

JAVASCRIPT: