foo.cc:3:11: error: too many decimal points in number
a,g:array[0..205]of longint;
^~~~~~
foo.cc:4:9: error: too many decimal points in number
f:array[0..700005]of longint;
^~~~~~~~~
foo.cc:5:10: error: too many decimal points in number
h:array[-707005..707005]of longint;
^~~~~~~~~~~~~~
foo.cc:1:1: error: 'var' does not name a type; did you mean 'char'?
var
^~~
char
foo.cc:3:1: error: 'a' does not name a type
a,g:array[0..205]of longint;
^
foo.cc:4:2: error: found ':' in nested-name-specifier, expected '::'
f:array[0..700005]of longint;
^
foo.cc:4:1: error: 'f' does not name a type
f:array[0..700005]of longint;
^
foo.cc:5:2: error: found ':' in nested-name-specifier, expected '::'
h:array[-707005..707005]of longint;
^
foo.cc:5:1: error: 'h' does not name a type
h:array[-707005..707005]of longint;
^
foo.cc:7:1: error: 'function' does not name a type; did you mean 'union'?
function max(a,b:longint):longint;
^~~~~~~~
union
foo.cc:8:1: error: 'begin' does not name a type
begin if a>b then exit(a); exit(b) end;
^~~~~
foo.cc:8:32: error: expected constructor, destructor, or type conversion before '(' token
begin if a>b then exit(a); exit(b) end;
^
foo.cc:10:1: error: 'begin' does not name a type
begin
^~~~~
foo.cc:12:1: error: expected unqualified-id before 'for'
for i:=1 to n do begin read(a[i]); inc(k,a[i]) end;
^~~
foo.cc:12:39: error: expected constructor, destructor, or type conversion before '(' token
for i:=1 to n do begin read(a[i]); inc(k,a[i]) end;
^
foo.cc:13:1: error: expected unqualified-id before 'for'
for i:=1+n to n<<1 do a[i]:=a[i-n];
^~~
foo.cc:14:1: error: expected unqualified-id before 'for'
for i:=1 to n<<1 do
^~~
foo.cc:18:1: error: 'f' does not name a type
f[a[i]]:=max(f[a[i]],i);
^
foo.cc:19:1: error: expected unqualified-id before 'if'
if i>=n then for j:=1 to k do
^~
foo.cc:22:1: error: expected unqualified-id before 'for'
for i:=1 to n do if g[i]>tmp then
^~~
foo.cc:23:18: error: 'ans' does not name a type
begin tmp:=g[i]; ans:=i end;
^~~
foo.cc:24:8: error: expected constructor, destructor, or type conversion before '(' token
writeln(ans);
^
foo.cc:25:1: error: 'k' does not name a type
k:=0;
^
foo.cc:26:1: error: 'h' does not name a type
h[0]:=1;
^
foo.cc:27:1: error: expected unqualified-id before 'for'
for i:=1 to n do if i<>ans then begin inc(k,a[i]);
^~~
foo.cc:28:1: error: expected unqualified-id before 'for'
for j:=k downto a[i] do h[j]:=h[j]or h[j-a[i]] end;
^~~
foo.cc:29:1: error: expected unqualified-id before 'for'
for i:=1 to n do if i<>ans then begin dec(s,a[i]);
^~~
foo.cc:30:1: error: expected unqualified-id before 'for'
for j:=s to k-a[i] do h[j]:=h[j]or h[j+a[i]] end;
^~~
foo.cc:31:1: error: expected unqualified-id before 'for'
for i:=1 to k+1 do if h[i]=0 then break;
^~~
foo.cc:32:6: error: expected constructor, destructor, or type conversion before '(' token
write(i)
^
正在同步测试数据,请稍后
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。