Problem | nevergiveup |
---|---|
User | usernamehere |
Submission Time | 2024-03-12 14:45:43 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
nevergiveup.cpp: In function ‘int main()’:
nevergiveup.cpp:15:645: error: expected ‘;’ before ‘return’
15 | cout << "struct node{\n int s,e,m,v;\n node *l,*r;\n node(int _s, int _e){\n s = _s;\n e = _e;\n m = (s+e)/2;\n v = 0;\n if (s != e){\n l = new node(s,m);\n r = new node(m+1,e);\n }\n }\n void update(int x,int add){\n v += add;\n if (s != e){\n if (x <= m) l->update(x,add);\n else r->update(x,add);\n }\n }\n int rsq(int x,int y){\n if (s == x && e == y) return v;\n if (y <= m) return l->rsq(x,y);\n if (x > m) return r->rsq(x,y);\n return l->rsq(x,m) + r->rsq(m+1,y);\n }\n}*root;"
|