![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
Java_beginer1
爱好算法
展开
-
HDU&&Color the ball
N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a #include #include #include#include#include#includeusing namespace std;int num[100006];i原创 2011-09-13 18:36:14 · 460 阅读 · 0 评论 -
树状数组原来可以这样用
高手的指点Topcoder上面的教程下面是树状数组的三个常用函数://c++代码inline int lowbit(int x){return x&(-x);}void updata(int x,int y){ while(x<=n)//n是原创 2011-08-17 11:51:29 · 412 阅读 · 0 评论 -
POJ2481让人无语
今天上午弄一上午poj2481poj的2481树状数组,不会,原本是树状数组的题明明自己的代码和别人的几乎一样可是我的就过不了让人无语啊,谁能救救我,主啊,sowhat,把代码贴出来以求神牛不吝赐教,,,,,,终于找到错误了,无语啊,从上午9点开始debug一直到刚刚啊:现在原创 2011-08-18 11:22:10 · 522 阅读 · 0 评论