![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
树状数组
文章平均质量分 78
Phoebe201421085
这个作者很懒,什么都没留下…
展开
-
poj2481
#include #include #include #include #define MAX 100005 using namespace std; struct cow { int x,y,id; }a[MAX]; int c[MAX],ans[MAX]; bool cmp(cow a,cow b) { if (原创 2015-03-27 16:26:50 · 322 阅读 · 0 评论 -
codeforces 61E
Enemy is weak time limit per test 5 seconds memory limit per test 256 megabytes input standard input output standard output The Romans have attacked again. This time the原创 2015-03-27 18:58:43 · 463 阅读 · 0 评论 -
poj2299
#include #include #include #include #define MAX 500005 using namespace std; struct node { long long val; int pos; }a[MAX]; int ans[MAX]; int c[MAX]; bool cmp1(原创 2015-03-27 18:03:26 · 300 阅读 · 0 评论 -
poj3067
#include #include #include #include #define MAX 1000010 using namespace std; int c[MAX]; int T,N,M,K; long long ans; struct road { int x; int y; }a[MAX]; bool原创 2015-03-22 17:14:02 · 301 阅读 · 0 评论 -
poj2352
数状数组: int lowbit(int x) { return x&(-x); } void add(int po,int val) { while (po { c[po]+=val; po+=lowbit(po); } } int getsum(int po) { int su原创 2015-03-22 16:36:11 · 246 阅读 · 0 评论