Problem duckbuttons
User WANCH5789W
Submission Time 2026-02-20 17:50:22
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckbuttons.cpp: In function ‘int main()’:
duckbuttons.cpp:11:1: error: expected initializer before ‘for’
11 | for (int i=0, i < n, i++) cin >> a[i]
| ^~~
duckbuttons.cpp:13:9: error: invalid types ‘<unresolved overloaded function type>[long long int]’ for array subscript
13 | max[n-1] = a[n-1]
| ^
duckbuttons.cpp:13:13: error: ‘a’ was not declared in this scope
13 | max[n-1] = a[n-1]
| ^
duckbuttons.cpp:14:22: error: ‘i’ was not declared in this scope
14 | for (int i = n - 2; i >= 0; i--);
| ^
duckbuttons.cpp:16:6: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘<unresolved overloaded function type>’)
16 | cout << max;
| ~~~~~^~~~~~
In file included from /usr/include/c++/9/iostream:39,
from duckbuttons.cpp:1:
/usr/include/c++/9/os