/in/foo.cc:3:9: error: too many decimal points in number
a:array[0..maxn+1] of longint;
^~~~~~~
/in/foo.cc:1:1: error: 'var' does not name a type
var
^~~
/in/foo.cc:3:2: error: found ':' in nested-name-specifier, expected '::'
a:array[0..maxn+1] of longint;
^
/in/foo.cc:3:1: error: 'a' does not name a type
a:array[0..maxn+1] of longint;
^
/in/foo.cc:4:1: error: 'begin' does not name a type
begin
^~~~~
/in/foo.cc:5:12: error: 't' does not name a type
readln(n); t:=0; p:=1;
^
/in/foo.cc:5:18: error: 'p' does not name a type
readln(n); t:=0; p:=1;
^
/in/foo.cc:6:1: error: expected unqualified-id before 'for'
for i:=1 to n do read(a[i]);
^~~
/in/foo.cc:7:1: error: 'a' does not name a type
a[0]:=a[n];a[n+1]:=a[1];
^
/in/foo.cc:7:12: error: 'a' does not name a type
a[0]:=a[n];a[n+1]:=a[1];
^
/in/foo.cc:8:1: error: expected unqualified-id before 'for'
for i:=1 to n do
^~~
/in/foo.cc:12:1: error: expected unqualified-id before 'if'
if t=1 then p:=i else break;
^~
/in/foo.cc:13:1: error: 'end' does not name a type
end
^~~
/in/foo.cc:15:19: error: 'halt' does not name a type
begin writeln(-1);halt end;
^~~~
/in/foo.cc:16:1: error: expected unqualified-id before 'if'
if t<2 then writeln((n-p+1)mod n) else writeln(-1);
^~
/in/foo.cc:17:1: error: 'end' does not name a type
end.
^~~