![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
西北有高楼
这个作者很懒,什么都没留下…
展开
-
hdu 1556 Color the ball
Color the ball Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9601 Accepted Submission(s): 4943 Problem Description N个气球排成一排,从左原创 2014-09-23 16:13:10 · 345 阅读 · 0 评论 -
LA4329 Ping pong
#include #include #include #include #define maxn 20000+20 #define maxm 100000+20 using namespace std; #define mem0(a) memset(a,0,sizeof(a)) int a[maxn],c[maxn],d[maxn],e[maxm]; void add(int x){原创 2014-09-23 14:59:47 · 318 阅读 · 0 评论 -
树状数组
原文地址:树状数组作者:AoZX http://blog.sina.com.cn/u/2034471544 树状数组 第01讲 什么是树状数组? 树状数组用来求区间元素和,求一次区间元素和的时间效率为O(logn)。 有些同学会觉得很奇怪。用一个数组S[i]保存序列A[]的前i个元素和,那么求区间i,j的元素和不就为S[j]-S[i-1],那么时间效率为O(1),岂不是更快? 但是,转载 2014-09-24 21:43:15 · 383 阅读 · 0 评论 -
poj 2155 Matrix
Matrix Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 18621 Accepted: 7022 Description Given an N*N matrix A, whose elements are either 0 or 1. A[i, j] mean原创 2014-09-24 16:13:12 · 303 阅读 · 0 评论 -
poj 2352 Stars
Stars Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 33003 Accepted: 14422 Description Astronomers often examine star maps where stars are represented by po转载 2014-09-24 20:29:43 · 326 阅读 · 0 评论