Problem robots2
User jackofall
Submission Time 2026-01-27 18:59:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

robots2.cpp: In function ‘int main()’:
robots2.cpp:33:19: error: ‘n’ was not declared in this scope
33 | for (int i=1;i<=n;i++){
| ^
robots2.cpp:43:20: error: invalid types ‘long long int[long long int]’ for array subscript
43 | if ((a==1 && w[b]<=w[a]) || (b==n && w[a]<=w[b])cout<<1<<endl;
| ^
robots2.cpp:43:26: error: invalid types ‘long long int[long long int]’ for array subscript
43 | if ((a==1 && w[b]<=w[a]) || (b==n && w[a]<=w[b])cout<<1<<endl;
| ^
robots2.cpp:43:36: error: ‘n’ was not declared in this scope
43 | if ((a==1 && w[b]<=w[a]) || (b==n && w[a]<=w[b])cout<<1<<endl;
| ^
robots2.cpp:43:44: error: invalid types ‘long long int[long long int]’ for array subscript
43 | if ((a==1 && w[b]<=w[a]) || (b==n && w[a]<=w[b])cout<&