foo.cc:2:13: error: too many decimal points in number
2 | var f:array[0..oo] of boolean;
| ^~~~~
foo.cc:4:13: error: too many decimal points in number
4 | a:array[0..maxn] of longint;
| ^~~~~~~
foo.cc:5:16: error: too many decimal points in number
5 | bool:array[0..maxn] of boolean;
| ^~~~~~~
foo.cc:1:7: error: 'oo' does not name a type; did you mean 'bool'?
1 | const oo=9000010;maxn=3010;
| ^~
| bool
foo.cc:1:18: error: 'maxn' does not name a type
1 | const oo=9000010;maxn=3010;
| ^~~~
foo.cc:2:1: error: 'var' does not name a type
2 | var f:array[0..oo] of boolean;
| ^~~
foo.cc:3:5: error: 'temp' does not name a type
3 | temp,n,m,i,j,tot,mingcd:longint;
| ^~~~
foo.cc:4:6: error: found ':' in nested-name-specifier, expected '::'
4 | a:array[0..maxn] of longint;
| ^
| ::
foo.cc:4:5: error: 'a' does not name a type
4 | a:array[0..maxn] of longint;
| ^
foo.cc:5:9: error: expected unqualified-id before ':' token
5 | bool:array[0..maxn] of boolean;
| ^
foo.cc:7:1: error: 'procedure' does not name a type
7 | procedure swap(var x,y:longint);
| ^~~~~~~~~
foo.cc:8:1: error: 'var' does not name a type
8 | var t:longint;
| ^~~
foo.cc:9:1: error: 'begin' does not name a type
9 | begin
| ^~~~~
foo.cc:10:8: error: 'x' does not name a type
10 | t:=x;x:=y;y:=t;
| ^
foo.cc:10:13: error: 'y' does not name a type
10 | t:=x;x:=y;y:=t;
| ^
foo.cc:11:1: error: 'end' does not name a type
11 | end;
| ^~~
foo.cc:13:1: error: 'procedure' does not name a type
13 | procedure gcd(a,b:longint);
| ^~~~~~~~~
foo.cc:14:1: error: 'var' does not name a type
14 | var r:longint;
| ^~~
foo.cc:15:1: error: 'begin' does not name a type
15 | begin
| ^~~~~
foo.cc:17:3: error: expected unqualified-id before 'if'
17 | if r=0 then mingcd:=b else gcd(b,r);
| ^~
foo.cc:18:1: error: 'end' does not name a type
18 | end;
| ^~~
foo.cc:20:1: error: 'begin' does not name a type
20 | begin
| ^~~~~
foo.cc:22:1: error: expected unqualified-id before 'for'
22 | for i:=1 to n do
| ^~~
foo.cc:25:9: error: expected ']' before '[' token
25 | bool[a[i]]:=true;
| ^
| ]
foo.cc:25:7: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
25 | bool[a[i]]:=true;
| ^
foo.cc:25:7: error: structured binding declaration cannot have type 'bool'
foo.cc:25:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
foo.cc:25:13: error: expected initializer before ':' token
25 | bool[a[i]]:=true;
| ^
foo.cc:25:13: error: expected ';' before ':' token
foo.cc:26:1: error: 'end' does not name a type
26 | end;
| ^~~
foo.cc:27:1: error: expected unqualified-id before 'for'
27 | for i:=1 to n do
| ^~~
foo.cc:31:11: error: expected ']' before '[' token
31 | bool[a[i]-j]:=true;
| ^
| ]
foo.cc:31:9: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
31 | bool[a[i]-j]:=true;
| ^
foo.cc:31:9: error: structured binding declaration cannot have type 'bool'
foo.cc:31:9: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
foo.cc:31:17: error: expected initializer before ':' token
31 | bool[a[i]-j]:=true;
| ^
foo.cc:32:3: error: 'end' does not name a type
32 | end;
| ^~~
foo.cc:33:1: error: expected unqualified-id before 'if'
33 | if bool[1] then
| ^~
foo.cc:36:3: error: 'halt' does not name a type
36 | halt;
| ^~~~
foo.cc:37:1: error: 'end' does not name a type
37 | end;
| ^~~
foo.cc:38:1: error: 'tot' does not name a type
38 | tot:=0;
| ^~~
foo.cc:39:1: error: expected unqualified-id before 'for'
39 | for i:=1 to 3000 do
| ^~~
foo.cc:43:5: error: 'a' does not name a type
43 | a[tot]:=i;
| ^
foo.cc:44:5: error: expected unqualified-id before 'if'
44 | if mingcd=0 then mingcd:=i else gcd(i,mingcd);
| ^~
foo.cc:45:3: error: 'end' does not name a type
45 | end;
| ^~~
foo.cc:46:1: error: expected unqualified-id before 'if'
46 | if mingcd<>1 then
| ^~
foo.cc:49:3: error: 'halt' does not name a type
49 | halt;
| ^~~~
foo.cc:50:1: error: 'end' does not name a type
50 | end;
| ^~~
foo.cc:51:1: error: 'i' does not name a type
51 | i:=0;f[0]:=true;
| ^
foo.cc:51:6: error: 'f' does not name a type
51 | i:=0;f[0]:=true;
| ^
foo.cc:52:1: error: expected unqualified-id before 'while'
52 | while true do
| ^~~~~
foo.cc:55:3: error: expected unqualified-id before 'for'
55 | for j:=1 to tot do
| ^~~
foo.cc:58:5: error: expected unqualified-id before 'if'
58 | if f[i-a[j]] then
| ^~
foo.cc:61:7: error: expected unqualified-id before 'break'
61 | break;
| ^~~~~
foo.cc:62:5: error: 'end' does not name a type
62 | end;
| ^~~
foo.cc:63:3: error: 'end' does not name a type
63 | end;
| ^~~
foo.cc:64:3: error: expected unqualified-id before 'if'
64 | if f[i]=false then temp:=0 else inc(temp);
| ^~
foo.cc:65:3: error: expected unqualified-id before 'if'
65 | if temp=a[1] then
| ^~
foo.cc:68:5: error: 'halt' does not name a type
68 | halt;
| ^~~~
foo.cc:69:3: error: 'end' does not name a type
69 | end;
| ^~~
foo.cc:70:1: error: 'end' does not name a type
70 | end;
| ^~~
foo.cc:71:1: error: 'end' does not name a type
71 | end.
| ^~~
[Hydro](https://hydro.ac)提供评测服务