Problem duckbuttons
User WANCH5789W
Submission Time 2026-02-20 18:00:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckbuttons.cpp: In function ‘int main()’:
duckbuttons.cpp:11:3: error: expected initializer before ‘for’
11 | for (int i=0; i < n; i++) cin >> a[i]
| ^~~
duckbuttons.cpp:11:17: error: ‘i’ was not declared in this scope
11 | for (int i=0; i < n; i++) cin >> a[i]
| ^
duckbuttons.cpp:13:2: error: ‘m_max’ was not declared in this scope
13 | m_max[n-1] = a[n-1]
| ^~~~~
duckbuttons.cpp:13:15: error: ‘a’ was not declared in this scope
13 | m_max[n-1] = a[n-1]
| ^
duckbuttons.cpp:17:1: error: ‘total_moves’ was not declared in this scope
17 | total_moves = max (m_max, d)
| ^~~~~~~~~~~