Problem chope
User AndyChen
Submission Time 2026-11-03 10:33:00
Score 0
Max Time N/A
Max Memory N/A

Compile Error

chope.cpp: In function ‘int main()’:
chope.cpp:15:12: error: expected ‘(’ before ‘left’
15 | if left > 0){
| ^~~~
| (
chope.cpp:23:9: error: ‘else’ without a previous ‘if’
23 | else {
| ^~~~
chope.cpp:28:23: error: ‘i’ was not declared in this scope
28 | occupied += a[i];
| ^
chope.cpp: At global scope:
chope.cpp:31:5: error: ‘cout’ does not name a type
31 | cout << "Yes";
| ^~~~
chope.cpp:32:1: error: expected declaration before ‘}’ token
32 | }
| ^