Problem supermarkets
User jpyhzzz
Submission Time 2026-06-08 10:06:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

supermarkets.cpp: In function ‘auto split(int)’:
supermarkets.cpp:20:9: error: expected initializer before ‘-’ token
20 | auto it - --odit.upper_bound({x, 0, 0});
| ^
supermarkets.cpp:20:39: error: expected primary-expression before ‘)’ token
20 | auto it - --odit.upper_bound({x, 0, 0});
| ^
supermarkets.cpp:21:5: error: ‘it’ was not declared in this scope; did you mean ‘int’?
21 | if (it->l == x) return it;
| ^~
| int
supermarkets.cpp:22:9: error: ‘it’ was not declared in this scope; did you mean ‘int’?
22 | int l = it->l, r = it->r, v = it->v;
| ^~
| int
supermarkets.cpp:24:21: error: ‘v’ was not declared in this scope
24 | odt.insert({l, x-1, v});
| ^
supermarkets.cpp:24:23: error: no matching function for call to ‘std::set<Node>::insert(<brace-enclosed initializer