树状数组
阿龙的圈子
仰望星空 脚踏实地
向前走 永不停
展开
-
poj 树状数组入门 2352
#include using namespace std;#define maxn 32005int N;int sum[maxn] , level[maxn];inline int lowbit(int x){ return x & (-x);}int get_sum(int x){ int s = 0; while(x > 0) {原创 2015-03-17 11:15:50 · 668 阅读 · 0 评论 -
hdu 4417 树状数组 离线处理
#include using namespace std;#define maxn 100000+10int T, n, m;int sum[maxn], ans[maxn];struct Node{ int r, l, id, h;}p[maxn] , q[maxn];int cmp(Node a, Node b){ return a.h < b.h;原创 2015-03-17 17:04:02 · 524 阅读 · 0 评论 -
codeforces 374D
D. Inna and Sequencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima's spent much time thinking what p原创 2015-08-12 16:31:26 · 762 阅读 · 0 评论 -
hdu 5372 Segment Game
Segment GameTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1198 Accepted Submission(s): 345Problem DescriptionLillian is a c原创 2015-08-15 13:35:01 · 784 阅读 · 0 评论 -
poj 2155 Matrix
MatrixTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 21721 Accepted: 8120DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] me原创 2015-10-02 20:43:09 · 369 阅读 · 0 评论 -
HDU 4046
PandaTime Limit: 10000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2950 Accepted Submission(s): 983Problem DescriptionWhen I wrote down th原创 2015-11-07 23:33:32 · 562 阅读 · 0 评论 -
Bestcoders 56 Clarke and puzzle
Clarke and puzzle Accepts: 129 Submissions: 322 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionClarke is a patien原创 2015-09-20 20:13:15 · 423 阅读 · 0 评论