| Problem | collectmushrooms3 |
|---|---|
| User | YH |
| Submission Time | 2025-11-08 22:59:16 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
collectmushrooms3.cpp: In function ‘void update(int&, int&, int&, int&, int&, std::vector<Node>&)’:
collectmushrooms3.cpp:86:30: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘int’
86 | else update(st[u].right, tm + 1, tr, d, new_val, st);
| ~~~^~~
collectmushrooms3.cpp:68:26: note: initializing argument 2 of ‘void update(int&, int&, int&, int&, int&, std::vector<Node>&)’
68 | void update(int &u, int &tl, int &tr, int &d, int &new_val, vector<Node> &st) {
| ~~~~~^~
collectmushrooms3.cpp: In function ‘int query(int&, int&, int&, int&, int&, std::vector<Node>&)’:
collectmushrooms3.cpp:96:72: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘int’
96 | return min(query(st[u].left, tl, tm, l, r, st), query(st[u].right, tm + 1, tr, l, r, st));
|