Problem snake
User wongyikai
Submission Time 2024-12-14 15:39:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

snake.cpp: In function ‘int main()’:
snake.cpp:30:52: error: expected ‘)’ before ‘}’ token
30 | d.push_front(d.front().first,d.front().second-1});
| ~ ^
| )
snake.cpp:30:53: error: expected primary-expression before ‘)’ token
30 | d.push_front(d.front().first,d.front().second-1});
| ^
snake.cpp:34:3: error: ‘else’ without a previous ‘if’
34 | else cout << d[p-1] << "\n";
| ^~~~
snake.cpp:34:18: error: ‘p’ was not declared in this scope
34 | else cout << d[p-1] << "\n";
| ^
snake.cpp: At global scope:
snake.cpp:37:1: error: expected declaration before ‘}’ token
37 | }
| ^