| Problem | segmenttree |
|---|---|
| User | EternalTempest |
| Submission Time | 2025-12-01 07:28:47 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
segmenttree.cpp: In function ‘int main()’:
segmenttree.cpp:84:26: error: invalid conversion from ‘STNode*’ to ‘int’ [-fpermissive]
84 | root->update(root, b, c);
| ^~~~
| |
| STNode*
segmenttree.cpp:58:21: note: initializing argument 1 of ‘void STNode::update(int, int, int)’
58 | void update(int a, int b, int new_val) {
| ~~~~^
segmenttree.cpp:86:50: error: no matching function for call to ‘STNode::query(STNode*&, int&, int&)’
86 | printf("%d\n", root->query(root, b, c));
| ^
segmenttree.cpp:50:9: note: candidate: ‘int STNode::query(int, int)’
50 | int query(int a, int b) {
| ^~~~~
segmenttree.cpp:50:9: note: candidate expects 2 arguments, 3 provided