/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: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