View Code #include<stdio.h>#include<string.h>#include<algorithm>using namespace std;#define maxn 50003#define lson l, m, rt<<1#define rson m+1, r, rt<<1|1#define mid int m = (l + r)>>1int col[maxn<<2];int lsum[maxn<<2], msum[maxn<<2], rsum[maxn&l Read More
posted @ 2012-11-24 19:43 To be an ACMan Views(160) Comments(0) Diggs(0)
View Code #include<stdio.h>#include<string.h>#include<algorithm>#include<vector>using namespace std;const int maxn = 8000<<1;#define lson l, m, rt<<1#define rson m+1, r, rt<<1|1#define mid int m = (l + r)>>1int n;int col[maxn<<2];int vis[maxn< Read More
posted @ 2012-11-24 18:15 To be an ACMan Views(189) Comments(0) Diggs(0)
View Code #include<stdio.h>#include<string.h>#include<algorithm>using namespace std;const int maxn = 65666<<1;#define lson l, m, rt<<1#define rson m+1, r, rt<<1|1#define mid int m = (l + r) >> 1int col[maxn<<2], XOR[maxn<<2];bool vis[maxn<< Read More
posted @ 2012-11-24 15:06 To be an ACMan Views(184) Comments(0) Diggs(0)
注意离散化View Code #include<stdio.h>#include<string.h>#include<algorithm>using namespace std;#define lson l, m, rt<<1#define rson m+1, r, rt<<1|1#define mid int m = (l + r)>>1#define maxn 10004int col[maxn<<4];int l[maxn], r[maxn];int a[maxn<<4], m, n;int Read More
posted @ 2012-11-24 12:52 To be an ACMan Views(205) Comments(0) Diggs(0)