摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=1542 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 #define lson l,mid,i<<1 6 #define rson mid+1,r,i<<1|1 7 using namespace std; 8 const int Ni = 210; 9 int n;10 struct node {11 dou 阅读全文
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=3397空间要开大点不然就RE。更新比较复杂,在取反时要注意先向下更新。如这样的数据:110 100 0 0 1 1 0 1 0 1 12 0 92 0 94 0 21 0 92 0 84 0 2 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #define lson l,mid,i<<1 5 #define rson mid+1,r,i<<1|1 6 using na 阅读全文