0_0_38128549_10253.cpp:30:69: error: 'nn' was not declared in this scope
void update(int l, int r, ll d, int p, int &q, int cl = 1, int cr = nn) {
^
0_0_38128549_10253.cpp: In function 'void update(int, int, ll, int, int&, int, int)':
0_0_38128549_10253.cpp:32:5: error: 'T' was not declared in this scope
T[q] = T[p];
^
0_0_38128549_10253.cpp:33:83: error: return-statement with a value, in function returning 'void' [-fpermissive]
if (cl >= l && cr <= r) return (void)(T[q].v += d * (cr - cl + 1), T[q].m += d);
^
0_0_38128549_10253.cpp: At global scope:
0_0_38128549_10253.cpp:39:52: error: 'nn' was not declared in this scope
ll query(int l, int r, int p, int cl = 1, int cr = nn, ll mk = 0) {
^
0_0_38128549_10253.cpp: In function 'll query(int, int, int, int, int, ll)':
0_0_38128549_10253.cpp:40:36: error: 'T' was not declared in this scope
if (cl >= l && cr <= r) return T[p].v + mk * (cr - cl + 1); // 加上带的标记
^
0_0_38128549_10253.cpp:43:38: error: 'T' was not declared in this scope
if (mid >= l) ans += query(l, r, T[p].ls, cl, mid, mk + T[p].m);
^
0_0_38128549_10253.cpp:44:37: error: 'T' was not declared in this scope
if (mid < r) ans += query(l, r, T[p].rs, mid + 1, cr, mk + T[p].m); // 带着标记传递
^
|