记录详情

Compile Error

foo.cc:14:1: error: stray '\345' in program
   14 | 其他的代码如下:
      | ^
foo.cc:14:2: error: stray '\205' in program
   14 | 其他的代码如下:
      |  ^
foo.cc:14:3: error: stray '\266' in program
   14 | 其他的代码如下:
      |   ^
foo.cc:14:4: error: stray '\344' in program
   14 | 其他的代码如下:
      |    ^
foo.cc:14:5: error: stray '\273' in program
   14 | 其他的代码如下:
      |     ^
foo.cc:14:6: error: stray '\226' in program
   14 | 其他的代码如下:
      |      ^
foo.cc:14:7: error: stray '\347' in program
   14 | 其他的代码如下:
      |       ^
foo.cc:14:8: error: stray '\232' in program
   14 | 其他的代码如下:
      |        ^
foo.cc:14:9: error: stray '\204' in program
   14 | 其他的代码如下:
      |         ^
foo.cc:14:10: error: stray '\344' in program
   14 | 其他的代码如下:
      |          ^
foo.cc:14:11: error: stray '\273' in program
   14 | 其他的代码如下:
      |           ^
foo.cc:14:12: error: stray '\243' in program
   14 | 其他的代码如下:
      |            ^
foo.cc:14:13: error: stray '\347' in program
   14 | 其他的代码如下:
      |             ^
foo.cc:14:14: error: stray '\240' in program
   14 | 其他的代码如下:
      |              ^
foo.cc:14:15: error: stray '\201' in program
   14 | 其他的代码如下:
      |               ^
foo.cc:14:16: error: stray '\345' in program
   14 | 其他的代码如下:
      |                ^
foo.cc:14:17: error: stray '\246' in program
   14 | 其他的代码如下:
      |                 ^
foo.cc:14:18: error: stray '\202' in program
   14 | 其他的代码如下:
      |                  ^
foo.cc:14:19: error: stray '\344' in program
   14 | 其他的代码如下:
      |                   ^
foo.cc:14:20: error: stray '\270' in program
   14 | 其他的代码如下:
      |                    ^
foo.cc:14:21: error: stray '\213' in program
   14 | 其他的代码如下:
      |                     ^
foo.cc:14:22: error: stray '\357' in program
   14 | 其他的代码如下:
      |                      ^
foo.cc:14:23: error: stray '\274' in program
   14 | 其他的代码如下:
      |                       ^
foo.cc:14:24: error: stray '\232' in program
   14 | 其他的代码如下:
      |                        ^
foo.cc:5:9: error: 'robot' was not declared in this scope
    5 | int cal(robot &r1, robot &r2)
      |         ^~~~~
foo.cc:5:16: error: 'r1' was not declared in this scope; did you mean 'y1'?
    5 | int cal(robot &r1, robot &r2)
      |                ^~
      |                y1
foo.cc:5:20: error: 'robot' was not declared in this scope
    5 | int cal(robot &r1, robot &r2)
      |                    ^~~~~
foo.cc:5:27: error: 'r2' was not declared in this scope
    5 | int cal(robot &r1, robot &r2)
      |                           ^~
foo.cc:5:29: error: expression list treated as compound expression in initializer [-fpermissive]
    5 | int cal(robot &r1, robot &r2)
      |                             ^
foo.cc:13:1: error: 'Copy' does not name a type
   13 | Copy
      | ^~~~
foo.cc: In function 'void solve()':
foo.cc:28:5: error: 'robot' was not declared in this scope
   28 |     robot a[n];
      |     ^~~~~
foo.cc:29:17: error: found ':' in nested-name-specifier, expected '::'
   29 |     for(robot &i: a) cin>> i.loc;
      |                 ^
      |                 ::
foo.cc:29:16: error: 'i' has not been declared
   29 |     for(robot &i: a) cin>> i.loc;
      |                ^
foo.cc:30:5: error: expected primary-expression before 'for'
   30 |     for(robot &i: a) cin>> i.vel;
      |     ^~~
foo.cc:29:34: error: expected ';' before 'for'
   29 |     for(robot &i: a) cin>> i.loc;
      |                                  ^
      |                                  ;
   30 |     for(robot &i: a) cin>> i.vel;
      |     ~~~                           
foo.cc:30:5: error: expected primary-expression before 'for'
   30 |     for(robot &i: a) cin>> i.vel;
      |     ^~~
foo.cc:29:34: error: expected ')' before 'for'
   29 |     for(robot &i: a) cin>> i.loc;
      |        ~                         ^
      |                                  )
   30 |     for(robot &i: a) cin>> i.vel;
      |     ~~~                           
foo.cc:30:17: error: found ':' in nested-name-specifier, expected '::'
   30 |     for(robot &i: a) cin>> i.vel;
      |                 ^
      |                 ::
foo.cc:30:16: error: 'i' has not been declared
   30 |     for(robot &i: a) cin>> i.vel;
      |                ^
foo.cc:32:9: error: condition declares an array
   32 |     int b[n];
      |         ^
foo.cc:33:5: error: expected primary-expression before 'for'
   33 |     for(int i = 0; i < n; i++) b[i] = -1, a[i].index = i;
      |     ^~~
foo.cc:32:14: error: expected ')' before 'for'
   32 |     int b[n];
      |              ^
      |              )
   33 |     for(int i = 0; i < n; i++) b[i] = -1, a[i].index = i;
      |     ~~~       
foo.cc:30:8: note: to match this '('
   30 |     for(robot &i: a) cin>> i.vel;
      |        ^
foo.cc:33:32: error: 'b' was not declared in this scope
   33 |     for(int i = 0; i < n; i++) b[i] = -1, a[i].index = i;
      |                                ^
foo.cc:33:43: error: 'a' was not declared in this scope
   33 |     for(int i = 0; i < n; i++) b[i] = -1, a[i].index = i;
      |                                           ^
foo.cc:42:24: error: 'a' was not declared in this scope
   42 |                 if(cal(a[i], a[j]) < minv)
      |                        ^
foo.cc:42:34: error: 'cal' cannot be used as a function
   42 |                 if(cal(a[i], a[j]) < minv)
      |                                  ^
foo.cc:44:42: error: 'cal' cannot be used as a function
   44 |                     minv = cal(a[i], a[j]); // 求最近的碰撞事件
      |                                          ^
foo.cc:51:9: error: 'b' was not declared in this scope
   51 |         b[a[loc1].index] = b[a[loc2].index] = cal(a[loc1], a[loc2]);
      |         ^
foo.cc:51:11: error: 'a' was not declared in this scope
   51 |         b[a[loc1].index] = b[a[loc2].index] = cal(a[loc1], a[loc2]);
      |           ^
foo.cc:51:67: error: 'cal' cannot be used as a function
   51 |         b[a[loc1].index] = b[a[loc2].index] = cal(a[loc1], a[loc2]);
      |                                                                   ^
foo.cc:57:16: error: 'b' was not declared in this scope
   57 |     for(int i: b) cout<<i<<" ";
      |                ^
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1287 机器人巡游
语言
C++
递交时间
2022-08-01 19:04:17
评测时间
2022-08-01 19:04:17
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes