foo.cc:8:17: error: too many decimal points in number
8 | var edge:array [0..210000] of node;
| ^~~~~~~~~
foo.cc:9:14: error: too many decimal points in number
9 | f:array [0..210000] of longint;
| ^~~~~~~~~
foo.cc:92:17: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
92 | write('Impossible');
| ^~~~~~~~~~~~
foo.cc:95:28: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
95 | if (ans>s) then write('Impossible')
| ^~~~~~~~~~~~
foo.cc:96:19: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
96 | else write('Need ',ans:10:2,' miles of cable');
| ^~~~~~~
foo.cc:96:36: warning: multi-character literal with 15 characters exceeds 'int' size of 4 bytes
96 | else write('Need ',ans:10:2,' miles of cable');
| ^~~~~~~~~~~~~~~~~
foo.cc:1:1: error: ‘program’ does not name a type
1 | program vijos1045(Freewing);
| ^~~~~~~
foo.cc:3:1: error: ‘type’ does not name a type; did you mean ‘typedef’?
3 | type node=record
| ^~~~
| typedef
foo.cc:5:7: error: found ‘:’ in nested-name-specifier, expected ‘::’
5 | w:real;
| ^
| ::
foo.cc:5:6: error: ‘w’ does not name a type
5 | w:real;
| ^
foo.cc:6:6: error: ‘end’ does not name a type
6 | end;
| ^~~
foo.cc:8:1: error: ‘var’ does not name a type
8 | var edge:array [0..210000] of node;
| ^~~
foo.cc:9:6: error: found ‘:’ in nested-name-specifier, expected ‘::’
9 | f:array [0..210000] of longint;
| ^
| ::
foo.cc:9:5: error: ‘f’ does not name a type
9 | f:array [0..210000] of longint;
| ^
foo.cc:10:5: error: ‘n’ does not name a type
10 | n,m,k,i,j,x,y,fx,fy:longint;
| ^
foo.cc:11:5: error: ‘ans’ does not name a type
11 | ans,w,s:real;
| ^~~
foo.cc:13:1: error: ‘procedure’ does not name a type
13 | procedure init(u,v:longint;w:real);
| ^~~~~~~~~
foo.cc:13:29: error: found ‘:’ in nested-name-specifier, expected ‘::’
13 | procedure init(u,v:longint;w:real);
| ^
| ::
foo.cc:13:28: error: ‘w’ does not name a type
13 | procedure init(u,v:longint;w:real);
| ^
foo.cc:14:1: error: ‘begin’ does not name a type
14 | begin
| ^~~~~
foo.cc:16:6: error: ‘edge’ does not name a type
16 | edge[k].u:=u;
| ^~~~
foo.cc:17:6: error: ‘edge’ does not name a type
17 | edge[k].v:=v;
| ^~~~
foo.cc:18:6: error: ‘edge’ does not name a type
18 | edge[k].w:=w;
| ^~~~
foo.cc:19:1: error: ‘end’ does not name a type
19 | end;
| ^~~
foo.cc:21:1: error: ‘procedure’ does not name a type
21 | procedure Qsort(x,y:longint);
| ^~~~~~~~~
foo.cc:22:1: error: ‘var’ does not name a type
22 | var l,r:longint;
| ^~~
foo.cc:23:8: error: found ‘:’ in nested-name-specifier, expected ‘::’
23 | mid:real;
| ^
| ::
foo.cc:23:5: error: ‘mid’ does not name a type
23 | mid:real;
| ^~~
foo.cc:24:8: error: found ‘:’ in nested-name-specifier, expected ‘::’
24 | tmp:node;
| ^
| ::
foo.cc:24:5: error: ‘tmp’ does not name a type
24 | tmp:node;
| ^~~
foo.cc:25:1: error: ‘begin’ does not name a type
25 | begin
| ^~~~~
foo.cc:27:6: error: ‘r’ does not name a type
27 | r:=y;
| ^
foo.cc:28:6: error: ‘mid’ does not name a type
28 | mid:=edge[(l+r)>>1].w;
| ^~~
foo.cc:29:6: error: ‘repeat’ does not name a type
29 | repeat
| ^~~~~~
foo.cc:31:12: error: expected unqualified-id before ‘while’
31 | while edge[r].w>mid do dec(r);
| ^~~~~
foo.cc:32:12: error: expected unqualified-id before ‘if’
32 | if r>=l then begin
| ^~
foo.cc:34:14: error: ‘edge’ does not name a type
34 | edge[l]:=edge[r];
| ^~~~
foo.cc:35:14: error: ‘edge’ does not name a type
35 | edge[r]:=tmp;
| ^~~~
foo.cc:36:17: error: expected constructor, destructor, or type conversion before ‘(’ token
36 | inc(l);
| ^
foo.cc:37:17: error: expected constructor, destructor, or type conversion before ‘(’ token
37 | dec(r);
| ^
foo.cc:38:12: error: ‘end’ does not name a type
38 | end;
| ^~~
foo.cc:39:6: error: ‘until’ does not name a type
39 | until l>r;
| ^~~~~
foo.cc:40:6: error: expected unqualified-id before ‘if’
40 | if x<r then Qsort(x,r);
| ^~
foo.cc:41:6: error: expected unqualified-id before ‘if’
41 | if l<y then Qsort(l,y);
| ^~
foo.cc:42:1: error: ‘end’ does not name a type
42 | end;
| ^~~
foo.cc:44:1: error: ‘function’ does not name a type; did you mean ‘union’?
44 | function find(x:longint):longint;
| ^~~~~~~~
| union
foo.cc:45:1: error: ‘begin’ does not name a type
45 | begin
| ^~~~~
foo.cc:47:6: error: ‘f’ does not name a type
47 | f[x]:=find(f[x]);
| ^
foo.cc:48:10: error: expected constructor, destructor, or type conversion before ‘(’ token
48 | exit(f[x]);
| ^
foo.cc:49:1: error: ‘end’ does not name a type
49 | end;
| ^~~
foo.cc:52:10: error: expected ‘)’ before ‘union’
52 | procedure union(x,y:longint);
| ^~~~~~
| )
foo.cc:51:1: note: to match this ‘(’
51 | (*
| ^
foo.cc:53:1: error: ‘var’ does not name a type
53 | var a,b:longint;
| ^~~
foo.cc:54:1: error: ‘begin’ does not name a type
54 | begin
| ^~~~~
foo.cc:56:6: error: ‘b’ does not name a type
56 | b:=find(y);
| ^
foo.cc:57:6: error: expected unqualified-id before ‘if’
57 | if a<>b then f[a]:=b;
| ^~
foo.cc:58:1: error: ‘end’ does not name a type
58 | end;
| ^~~
foo.cc:59:2: error: expected unqualified-id before ‘)’ token
59 | *)
| ^
foo.cc:64:12: error: expected constructor, destructor, or type conversion before ‘(’ token
64 | readln(n);
| ^
foo.cc:65:6: error: ‘m’ does not name a type
65 | m:=0;
| ^
foo.cc:66:6: error: expected unqualified-id before ‘while’
66 | while not eof do begin
| ^~~~~
foo.cc:68:12: error: expected constructor, destructor, or type conversion before ‘(’ token
68 | inc(m);
| ^
foo.cc:69:13: error: expected constructor, destructor, or type conversion before ‘(’ token
69 | init(x,y,w);
| ^
foo.cc:70:6: error: ‘end’ does not name a type
70 | end;
| ^~~
foo.cc:72:6: error: expected unqualified-id before ‘for’
72 | for i:=1 to n do f[i]:=i;
| ^~~
foo.cc:73:11: error: expected constructor, destructor, or type conversion before ‘(’ token
73 | Qsort(1,m);
| ^
foo.cc:74:6: error: ‘ans’ does not name a type
74 | ans:=0;
| ^~~
foo.cc:75:6: error: ‘k’ does not name a type
75 | k:=0;
| ^
foo.cc:76:6: error: expected unqualified-id before ‘for’
76 | for i:=1 to m do begin
| ^~~
foo.cc:78:9: error: ‘y’ does not name a type
78 | y:=edge[i].v;
| ^
foo.cc:79:9: error: ‘fx’ does not name a type
79 | fx:=find(x);
| ^~
foo.cc:80:9: error: ‘fy’ does not name a type
80 | fy:=find(y);
| ^~
foo.cc:81:9: error: expected unqualified-id before ‘if’
81 | if fx<>fy then begin
| ^~
foo.cc:83:11: error: ‘ans’ does not name a type
83 | ans:=ans+edge[i].w;
| ^~~
foo.cc:84:14: error: expected constructor, destructor, or type conversion before ‘(’ token
84 | inc(k);
| ^
foo.cc:85:9: error: ‘end’ does not name a type
85 | end;
| ^~~
foo.cc:86:9: error: expected unqualified-id before ‘if’
86 | if k>=n-1 then break;
| ^~
foo.cc:87:6: error: ‘end’ does not name a type
87 | end;
| ^~~
foo.cc:89:6: error: ‘fx’ does not name a type
89 | fx:=find(1);
| ^~
foo.cc:90:6: error: expected unqualified-id before ‘for’
90 | for i:=1 to n do
| ^~~
foo.cc:93:11: error: ‘exit’ does not name a type
93 | exit;
| ^~~~
foo.cc:1:1: note: ‘exit’ is defined in header ‘<cstdlib>’; this is probably fixable by adding ‘#include <cstdlib>’
+++ |+#include <cstdlib>
1 | program vijos1045(Freewing);
foo.cc:94:9: error: ‘end’ does not name a type
94 | end;
| ^~~
foo.cc:95:6: error: expected unqualified-id before ‘if’
95 | if (ans>s) then write('Impossible')
| ^~
foo.cc:97:1: error: ‘end’ does not name a type
97 | end.
| ^~~