2013年9月4日

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 阅读(2982) 评论(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 阅读(2575) 评论(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 阅读(1611) 评论(0) 推荐(0) 编辑

导航

JAVASCRIPT: