记录详情

Compile Error

/in/foo.cc:1:1: error: 'var' does not name a type; did you mean 'char'?
 var
 ^~~
 char
/in/foo.cc:3:1: error: 'begin' does not name a type
 begin
 ^~~~~
/in/foo.cc:7:10: error: expected constructor, destructor, or type conversion before '(' token
   rewrite(output);
          ^
/in/foo.cc:8:7: error: expected constructor, destructor, or type conversion before '(' token
   read(n,m);
       ^
/in/foo.cc:9:7: error: expected constructor, destructor, or type conversion before '(' token
   read(t);
       ^
/in/foo.cc:10:3: error: 's' does not name a type
   s:=0; l:=1; r:=m;                   //l表示船最左端的列数,r表示船最右端的列数
   ^
/in/foo.cc:10:9: error: 'l' does not name a type
   s:=0; l:=1; r:=m;                   //l表示船最左端的列数,r表示船最右端的列数
         ^
/in/foo.cc:10:15: error: 'r' does not name a type
   s:=0; l:=1; r:=m;                   //l表示船最左端的列数,r表示船最右端的列数
               ^
/in/foo.cc:11:3: error: expected unqualified-id before 'for'
   for i:=1 to t do
   ^~~
/in/foo.cc:14:5: error: expected unqualified-id before 'if'
     if (k>=l) and (k<=r) then s:=s+0  //如果苹果在船的范围内,船不用移动
     ^~
/in/foo.cc:20:11: error: 'l' does not name a type
           l:=l+(k-r);
           ^
/in/foo.cc:21:11: error: 'r' does not name a type
           r:=k;
           ^
/in/foo.cc:22:9: error: 'end' does not name a type; did you mean 'enum'?
         end
         ^~~
         enum
/in/foo.cc:26:11: error: 'r' does not name a type
           r:=r-(l-k);
           ^
/in/foo.cc:27:11: error: 'l' does not name a type
           l:=k;
           ^
/in/foo.cc:28:9: error: 'end' does not name a type; did you mean 'enum'?
         end;
         ^~~
         enum
/in/foo.cc:29:7: error: 'end' does not name a type; did you mean 'enum'?
       end;
       ^~~
       enum
/in/foo.cc:30:3: error: 'end' does not name a type; did you mean 'enum'?
   end;
   ^~~
   enum
/in/foo.cc:31:10: error: expected constructor, destructor, or type conversion before '(' token
   writeln(s);                 //输出步数
          ^
/in/foo.cc:32:8: error: expected constructor, destructor, or type conversion before '(' token
   close(input);
        ^
/in/foo.cc:33:8: error: expected constructor, destructor, or type conversion before '(' token
   close(output);
        ^
/in/foo.cc:34:1: error: 'end' does not name a type; did you mean 'enum'?
 end.
 ^~~
 enum

信息

递交者
类型
递交
题目
2# 接苹果
题目数据
下载
语言
C++
递交时间
2018-11-07 18:47:54
评测时间
2018-11-07 18:47:54
评测机
分数
0
总耗时
10ms
峰值内存
2.793 MiB