| Problem | poklon |
|---|---|
| User | YH |
| Submission Time | 2025-12-03 21:07:57 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
poklon.cpp: In function ‘void solve()’:
poklon.cpp:125:83: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘int’
125 | if (get<0>(mp[a[i]]) != -1) roots[i] = update(roots[i], 1, n, get<0>(mp[a[i]]), 0);
| ^
poklon.cpp:82:53: note: initializing argument 5 of ‘int update(int, int, int, int&, int&)’
82 | int update(int prev, int tl, int tr, int &idx, int &val) {
| ~~~~~^~~
poklon.cpp:132:83: error: cannot bind non-const lvalue reference of type ‘int&’ to an rvalue of type ‘int’
132 | if (get<0>(mp[a[i]]) != -1) roots[i] = update(roots[i], 1, n, get<0>(mp[a[i]]), -1);
| ^~
poklon.cpp:82:53: note: initializing argument 5 of ‘int update(int, int, int, int&, int&)’