Problem | lunchbox |
---|---|
User | HelloMhing |
Submission Time | 2024-02-03 21:50:13 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lunchbox.cpp:3:5: error: cannot declare ‘::main’ to be a global variable
3 | int main{
| ^~~~
lunchbox.cpp:4:2: error: expected primary-expression before ‘int’
4 | int n, m;
| ^~~
lunchbox.cpp:4:2: error: expected ‘}’ before ‘int’
lunchbox.cpp:3:9: note: to match this ‘{’
3 | int main{
| ^
lunchbox.cpp:5:7: error: expected constructor, destructor, or type conversion before ‘(’ token
5 | scanf("%d%d", &n, &m);
| ^
lunchbox.cpp:6:8: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
6 | int x[m], sum=0, count=0;
| ^
| tm
lunchbox.cpp:7:2: error: expected unqualified-id before ‘for’
7 | for (int i=0;i<m;i++){
| ^~~
lunchbox.cpp:7:15: error: ‘i’ does not name a type
7 | for (int i=0;i<m;i++){
| ^
lunchbox.cpp:7:19: error: ‘i’ does not name a type
7 | for (int i=0;i<m;