分块
Lyang0.0
这个作者很懒,什么都没留下…
展开
-
C - Super Mario(分块3)
Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and Mario needs to save his lover. We regard the road to...原创 2019-08-01 21:07:07 · 125 阅读 · 0 评论 -
B - Argestes and Sequence(分块2)
Argestes has a lot of hobbies and likes solving query problems especially. One day Argestes came up with such a problem. You are given a sequence a consisting of N nonnegative integers, a[1],a[2],...,...原创 2019-08-01 20:03:28 · 124 阅读 · 0 评论 -
A - Color the ball(线段树分块1 || 树状数组)
N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗?Input每个测试实例第一行为一个整数N,(N <= 100000).接下来的N行,每行包括2个整数...原创 2019-08-01 17:08:25 · 109 阅读 · 0 评论 -
C - A Simple Problem with Integers(线段树区间更新)
You haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the ...原创 2019-07-30 12:37:26 · 82 阅读 · 0 评论