树状数组
文章平均质量分 78
JSK670072474
这个作者很懒,什么都没留下…
展开
-
hdu1166 敌兵布阵
Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过...原创 2018-03-18 16:47:02 · 148 阅读 · 0 评论 -
hdu1556 Color the ball
Description N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几次颜色吗? ...原创 2018-03-18 17:14:12 · 353 阅读 · 0 评论 -
hdu2689 Sort it
Description You want to processe a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending order. Then how many times it nee...原创 2018-03-18 17:35:02 · 246 阅读 · 0 评论 -
hdu1541 Stars
Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the sta...原创 2018-03-24 10:03:20 · 214 阅读 · 0 评论