
树状数组
文章平均质量分 75
talak
这个作者很懒,什么都没留下…
展开
-
Movie collection
Movie collection Mr. K. I. has a very big movie collection. He has organized his collection in a big stack. Whenever he wants to watch one of the movies, he locates the movie in this stack and remov原创 2012-09-05 22:16:28 · 1173 阅读 · 0 评论 -
poj 2352 stars
初学树状数组练手 题目就是 给你个二维平面 和一些点 对于每个点左下角有多少个点 那就是多少等级(包括边界) 让你输出0到N-1的等级数 http://poj.org/problem?id=2352 因为给你的数是按Y升序给的 对象Y相等的事按X升序 省去了自己排序 用树状数组直接算X前面有多少个点 代码: #include #include #include #inc原创 2012-08-31 12:20:30 · 407 阅读 · 0 评论 -
hdu 4267
http://acm.hdu.edu.cn/showproblem.php?pid=4267 又学到了一点 区间更新 单点查值得树状数组 代码: #include #include #include #include #include #include #include #include using namespace std; int n; int num[50005原创 2012-09-13 12:20:27 · 752 阅读 · 0 评论 -
hdu 1556
树状数组 区间应用模版题 代码: #include #include #include #include #include #include #include #include using namespace std; int tree[100005]; int n; int lowbit(int x) { return x&(-x); } int update(int原创 2012-09-13 21:01:21 · 416 阅读 · 0 评论