Problem trainorbus
User Orson
Submission Time 2026-02-01 12:11:57
Score 0
Max Time N/A
Max Memory N/A

Compile Error

trainorbus.cpp: In function ‘int main()’:
trainorbus.cpp:8:5: error: ‘arr’ was not declared in this scope
8 | arr a[n];
| ^~~
trainorbus.cpp:9:8: error: expected ‘;’ before ‘b’
9 | arr b[n];
| ^~
| ;
trainorbus.cpp:11:16: error: ‘a’ was not declared in this scope
11 | cin >> a[i];
| ^
trainorbus.cpp:14:16: error: ‘b’ was not declared in this scope
14 | cin >> b[i];
| ^
trainorbus.cpp:17:13: error: ‘a’ was not declared in this scope
17 | if (a[i]>b[i]){
| ^
trainorbus.cpp:17:18: error: ‘b’ was not declared in this scope
17 | if (a[i]>b[i]){
| ^
trainorbus.cpp:24:16: error: expected ‘;’ before ‘return’
24 | cout << ans
| ^
| ;
25 | return 0;
| ~~~~~~