hdu-4027 Can you answer these queries?
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4027 修改操作是把区间内的所有数开根号 另一个操作是区间求和操作 2 的 63 次开方6,7 根号也就变为了 1 。 #include <iostream> #include <cmath> #include <cstdio> #include <string> #include <cstring> #include <cstdlib> #include <algorithm> #include <stack> #include <set> #include <queue> #include <map> using namespace std; #define ll(ind) (ind<<1) #define rr(ind) (ind<<1|1) #define Mid(a,b) (a+((b-a)>>1)) typedef __int64 LL; const int N = 5020000; LL a[N]; int n, m, b, c, d; struct node { int left, right; int mid() { return Mid(left, right); } LL num; }; struct segtree { node tree[N * 4];