树状数组
文章平均质量分 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 · 383 阅读 · 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 · 541 阅读 · 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 · 354 阅读 · 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 · 345 阅读 · 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 · 291 阅读 · 0 评论
分享