摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=2227离散化+树状数组View Code 1 //2227 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 using namespace std; 6 7 const int N=100010,maxn=100000,md=1000000007; 8 int val[N],a[N]; 9 __int64 c[N];10 int lowbit(int x)11 {12 return x&am
阅读全文
posted @ 2012-03-27 20:06
Qiuqiqiu
阅读(146)
推荐(0)
编辑
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=3743离散化+树状数组View Code 1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 using namespace std; 5 6 const int N=1000100,maxn=1000000; 7 int val[N],a[N],c[N]; 8 int lowbit(int x) 9 {10 return x&(-x);11 }12 int bfind(int x,in
阅读全文
posted @ 2012-03-27 18:48
Qiuqiqiu
阅读(259)
推荐(0)
编辑
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=2838View Code 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 const int N=100100,maxn=100000; 6 int ccnt[N]; 7 __int64 csum[N]; 8 int lowbit(int x) 9 {10 return x&(x^(x-1));11 }12 int main()13 {14 int n,x;15 while (~scanf(
阅读全文
posted @ 2012-03-27 15:42
Qiuqiqiu
阅读(263)
推荐(0)
编辑