/in/foo.cc:1:1: error: 'var' does not name a type
var
^~~
/in/foo.cc:5:5: error: found ':' in nested-name-specifier, expected '::'
now : array [ 1 .. 1000000 , 1 .. 2 ] of longint;
^
/in/foo.cc:5:1: error: 'now' does not name a type
now : array [ 1 .. 1000000 , 1 .. 2 ] of longint;
^~~
/in/foo.cc:7:5: error: found ':' in nested-name-specifier, expected '::'
vis : array [ 1 .. 1000 , 1 .. 1000 ] of boolean;
^
/in/foo.cc:7:1: error: 'vis' does not name a type
vis : array [ 1 .. 1000 , 1 .. 1000 ] of boolean;
^~~
/in/foo.cc:9:5: error: found ':' in nested-name-specifier, expected '::'
tot : array [ 1 .. 1001 ] of longint;
^
/in/foo.cc:9:1: error: 'tot' does not name a type
tot : array [ 1 .. 1001 ] of longint;
^~~
/in/foo.cc:11:1: error: 'n' does not name a type
n , m , ans : longint;
^
/in/foo.cc:13:1: error: 'procedure' does not name a type
procedure main;
^~~~~~~~~
/in/foo.cc:15:1: error: 'var' does not name a type
var
^~~
/in/foo.cc:19:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:31:1: error: expected unqualified-id before 'if'
if vis[i , j] then
^~
/in/foo.cc:37:17: error: expected constructor, destructor, or type conversion before '(' token
inc(tot[i]); dec(tot[right[i , j]]);
^
/in/foo.cc:39:1: error: 'now' does not name a type
now[k , 1] := i; now[k , 2] := right[i , j];
^~~
/in/foo.cc:39:18: error: 'now' does not name a type
now[k , 1] := i; now[k , 2] := right[i , j];
^~~
/in/foo.cc:41:1: error: 'end' does not name a type
end
^~~
/in/foo.cc:45:18: error: 't' does not name a type
s := now[k , 1]; t := now[k , 2];
^
/in/foo.cc:47:4: error: expected constructor, destructor, or type conversion before '(' token
dec(tot); inc(tot[t]);
^
/in/foo.cc:47:14: error: expected constructor, destructor, or type conversion before '(' token
dec(tot); inc(tot[t]);
^
/in/foo.cc:49:1: error: expected unqualified-id before 'if'
if (i >= s) and (i < t) then t := i;
^~
/in/foo.cc:51:1: error: expected unqualified-id before 'if'
if i < s then begin t := s; s := i; end;
^~
/in/foo.cc:51:29: error: 's' does not name a type
if i < s then begin t := s; s := i; end;
^
/in/foo.cc:51:37: error: 'end' does not name a type
if i < s then begin t := s; s := i; end;
^~~
/in/foo.cc:53:1: error: expected unqualified-id before 'if'
if t > right[i , j] then t := right[i , j];
^~
/in/foo.cc:55:4: error: expected constructor, destructor, or type conversion before '(' token
inc(tot); dec(tot[t]);
^
/in/foo.cc:55:14: error: expected constructor, destructor, or type conversion before '(' token
inc(tot); dec(tot[t]);
^
/in/foo.cc:57:1: error: 'now' does not name a type
now[k , 1] := s; now[k , 2] := t;
^~~
/in/foo.cc:57:18: error: 'now' does not name a type
now[k , 1] := s; now[k , 2] := t;
^~~
/in/foo.cc:59:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:61:1: error: 'sum' does not name a type
sum[i , j] := sum[i-1 , j] + tot[i];
^~~
/in/foo.cc:63:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:65:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:67:1: error: expected unqualified-id before 'for'
for i := 1 to n do
^~~
/in/foo.cc:75:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:77:8: error: expected constructor, destructor, or type conversion before '(' token
writeln(ans);
^
/in/foo.cc:79:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:81:1: error: 'procedure' does not name a type
procedure init;
^~~~~~~~~
/in/foo.cc:83:1: error: 'var' does not name a type
var
^~~
/in/foo.cc:87:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:91:1: error: expected unqualified-id before 'for'
for i := 1 to n do
^~~
/in/foo.cc:95:1: error: expected unqualified-id before 'for'
for j := 1 to m do
^~~
/in/foo.cc:103:1: error: expected unqualified-id before 'if'
if (now[k , 2] < j) then
^~
/in/foo.cc:107:18: error: 'now' does not name a type
now[k , 1] := i; now[k , 2] := j;
^~~
/in/foo.cc:109:1: error: 'vis' does not name a type
vis[i , j] := true;
^~~
/in/foo.cc:111:1: error: 'right' does not name a type
right[i , j] := n+1;
^~~~~
/in/foo.cc:113:1: error: expected unqualified-id before 'continue'
continue;
^~~~~~~~
/in/foo.cc:115:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:117:1: error: expected unqualified-id before 'if'
if right[now[k , 1] , j] = n+1 then
^~
/in/foo.cc:123:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:125:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:127:9: error: expected constructor, destructor, or type conversion before '(' token
fillchar(now , sizeof(now) , 0);
^
/in/foo.cc:129:1: error: 'end' does not name a type
end;
^~~
/in/foo.cc:131:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:135:1: error: 'main' does not name a type
main;
^~~~
/in/foo.cc:137:1: error: 'end' does not name a type
end.
^~~