重新学编程之分块
ZZ --瑞 hopeACMer
WA就完事了
展开
-
A - Color the ball(分块1)(分块法,,,,线段树法,,,,不知道啥法)
A - Color the ball(分块1) N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗? Input 每个测试实例第一行为一个整数N,(N &...原创 2019-07-29 11:02:48 · 102 阅读 · 0 评论 -
B - Argestes and Sequence(分块+快速幂)
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-03 19:39:45 · 104 阅读 · 0 评论 -
C - Super Mario(分块+二分)
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-03 20:04:40 · 68 阅读 · 0 评论