Problem peakfinding
User yihai
Submission Time 2026-01-28 16:48:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

peakfinding.cpp: In function ‘int main()’:
peakfinding.cpp:9:6: error: ‘i’ was not declared in this scope
9 | for(i=0;i<N;i++){
| ^
peakfinding.cpp:10:16: error: expected ‘;’ before ‘if’
10 | int k; cin>>k
| ^
| ;
11 | if (k>maxVal){
| ~~
peakfinding.cpp:15:14: error: expected ‘;’ before ‘}’ token
15 | cout<<maxVal
| ^
| ;
16 | }
| ~