Problem | lunchbox |
---|---|
User | Maskaphobia |
Submission Time | 2024-02-02 13:33:27 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lunchbox.cpp: In function ‘int main()’:
lunchbox.cpp:12:22: error: expected ‘;’ before ‘}’ token
12 | empty_set.insert(n)
| ^
| ;
13 | }
| ~
lunchbox.cpp:14:24: error: redeclaration of ‘std::set<int> empty_set’
14 | set <int, less <int>> empty_set;
| ^~~~~~~~~
lunchbox.cpp:7:12: note: ‘std::set<int> empty_set’ previously declared here
7 | set <int> empty_set;
| ^~~~~~~~~
lunchbox.cpp:16:3: error: ‘total’ was not declared in this scope
16 | total += empty_set[i]
| ^~~~~
lunchbox.cpp:16:21: error: no match for ‘operator[]’ (operand types are ‘std::set<int>’ and ‘int’)
16 | total += empty_set[i]
| ^
lunchbox.cpp:19:6: error: ‘else’ without a previous ‘if’
19 | } else {
| ^~~~
lunchbox.c