Compile Error

/in/foo.cc:3:22: error: expected initializer before 'pos'
    3 | int n,m,a[101],b[101]pos,mx;
      |                      ^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:10:25: error: 'b' was not declared in this scope
   10 |                         b[++pos]=l;
      |                         ^
/in/foo.cc:10:29: error: 'pos' was not declared in this scope; did you mean 'pow'?
   10 |                         b[++pos]=l;
      |                             ^~~
      |                             pow
/in/foo.cc:13:9: error: 'pos' was not declared in this scope; did you mean 'pow'?
   13 |         pos=0;
      |         ^~~
      |         pow
/in/foo.cc:19:35: error: 'b' was not declared in this scope
   19 |                         if(a[pos]-b[pos]>mx){
      |                                   ^
/in/foo.cc:19:42: error: 'mx' was not declared in this scope; did you mean 'm'?
   19 |                         if(a[pos]-b[pos]>mx){
      |                                          ^~
      |                                          m
/in/foo.cc:24:15: error: 'mx' was not declared in this scope; did you mean 'm'?
   24 |         cout<<mx<<endl;
      |               ^~
      |               m

信息

递交者
类型
递交
题目
P3035 Speeding Ticket
语言
C++
递交时间
2026-07-22 14:09:36
评测时间
2026-07-22 14:09:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes