Problem duckhunt5
User Yichen
Submission Time 2025-08-19 14:22:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt5.cpp:4:5: error: cannot declare ‘::main’ to be a global variable
4 | int main {
| ^~~~
duckhunt5.cpp:6:2: error: expected primary-expression before ‘long’
6 | long long n, x;
| ^~~~
duckhunt5.cpp:6:2: error: expected ‘}’ before ‘long’
duckhunt5.cpp:4:10: note: to match this ‘{’
4 | int main {
| ^
duckhunt5.cpp:8:2: error: expected unqualified-id before ‘for’
8 | for (int i = 0; i < n: i++) {
| ^~~
duckhunt5.cpp:8:18: error: ‘i’ does not name a type
8 | for (int i = 0; i < n: i++) {
| ^
duckhunt5.cpp:22:1: error: expected declaration before ‘}’ token
22 | }
| ^