/ Vijos /

记录详情

Compile Error

foo.cc:11:20: error: too many decimal points in number
   11 |         head:array[1..500050] of point;
      |                    ^~~~~~~~~
foo.cc:12:20: error: too many decimal points in number
   12 |         list:array[1..500050] of longint;
      |                    ^~~~~~~~~
foo.cc:14:26: error: too many decimal points in number
   14 |         visit,flag:array[1..5000050] of boolean;
      |                          ^~~~~~~~~~
foo.cc:15:30: error: too many decimal points in number
   15 |         pre,pred,sum,f:array[1..500050] of longint;
      |                              ^~~~~~~~~
foo.cc:18:24: error: too many decimal points in number
   18 |         queue,qt:array[1..500050] of longint;
      |                        ^~~~~~~~~
foo.cc:1:1: error: 'program' does not name a type
    1 | program vjiosP1553;
      | ^~~~~~~
foo.cc:3:1: error: 'type' does not name a type
    3 | type
      | ^~~~
foo.cc:5:9: error: 'node' does not name a type
    5 |         node=record
      |         ^~~~
foo.cc:7:21: error: found ':' in nested-name-specifier, expected '::'
    7 |                 next:point;
      |                     ^
      |                     ::
foo.cc:7:17: error: 'next' does not name a type
    7 |                 next:point;
      |                 ^~~~
foo.cc:8:9: error: 'end' does not name a type
    8 |         end;
      |         ^~~
foo.cc:9:1: error: 'var' does not name a type
    9 | var
      | ^~~
foo.cc:11:13: error: found ':' in nested-name-specifier, expected '::'
   11 |         head:array[1..500050] of point;
      |             ^
      |             ::
foo.cc:11:9: error: 'head' does not name a type
   11 |         head:array[1..500050] of point;
      |         ^~~~
foo.cc:12:13: error: found ':' in nested-name-specifier, expected '::'
   12 |         list:array[1..500050] of longint;
      |             ^
      |             ::
foo.cc:12:9: error: 'list' does not name a type
   12 |         list:array[1..500050] of longint;
      |         ^~~~
foo.cc:13:14: error: found ':' in nested-name-specifier, expected '::'
   13 |         lists:longint;
      |              ^
      |              ::
foo.cc:13:9: error: 'lists' does not name a type
   13 |         lists:longint;
      |         ^~~~~
foo.cc:14:9: error: 'visit' does not name a type
   14 |         visit,flag:array[1..5000050] of boolean;
      |         ^~~~~
foo.cc:15:9: error: 'pre' does not name a type
   15 |         pre,pred,sum,f:array[1..500050] of longint;
      |         ^~~
foo.cc:16:9: error: 'key' does not name a type
   16 |         key,max:longint;
      |         ^~~
foo.cc:17:12: error: found ':' in nested-name-specifier, expected '::'
   17 |         ans:longint;
      |            ^
      |            ::
foo.cc:17:9: error: 'ans' does not name a type
   17 |         ans:longint;
      |         ^~~
foo.cc:18:9: error: 'queue' does not name a type
   18 |         queue,qt:array[1..500050] of longint;
      |         ^~~~~
foo.cc:19:9: error: 'qhead' does not name a type
   19 |         qhead,qtail:longint;
      |         ^~~~~
foo.cc:21:1: error: 'function' does not name a type; did you mean 'union'?
   21 | function maxf(a,b:longint):longint;
      | ^~~~~~~~
      | union
foo.cc:22:1: error: 'begin' does not name a type
   22 | begin
      | ^~~~~
foo.cc:27:1: error: 'end' does not name a type
   27 | end;
      | ^~~
foo.cc:29:1: error: 'function' does not name a type; did you mean 'union'?
   29 | function minf(a,b:longint):longint;
      | ^~~~~~~~
      | union
foo.cc:30:1: error: 'begin' does not name a type
   30 | begin
      | ^~~~~
foo.cc:35:1: error: 'end' does not name a type
   35 | end;
      | ^~~
foo.cc:37:1: error: 'procedure' does not name a type
   37 | procedure initdfs;
      | ^~~~~~~~~
foo.cc:38:1: error: 'begin' does not name a type
   38 | begin
      | ^~~~~
foo.cc:40:17: error: expected constructor, destructor, or type conversion before '(' token
   40 |         fillchar(pre,sizeof(pre),0);
      |                 ^
foo.cc:41:17: error: expected constructor, destructor, or type conversion before '(' token
   41 |         fillchar(pred,sizeof(pred),0);
      |                 ^
foo.cc:42:9: error: 'max' does not name a type
   42 |         max:=0;
      |         ^~~
foo.cc:43:1: error: 'end' does not name a type
   43 | end;
      | ^~~
foo.cc:45:1: error: 'procedure' does not name a type
   45 | procedure initq;
      | ^~~~~~~~~
foo.cc:46:1: error: 'begin' does not name a type
   46 | begin
      | ^~~~~
foo.cc:48:9: error: 'qtail' does not name a type
   48 |         qtail:=1;
      |         ^~~~~
foo.cc:49:1: error: 'end' does not name a type
   49 | end;
      | ^~~
foo.cc:51:1: error: 'procedure' does not name a type
   51 | procedure put(data,id:longint);
      | ^~~~~~~~~
foo.cc:52:1: error: 'var' does not name a type
   52 | var
      | ^~~
foo.cc:54:1: error: 'begin' does not name a type
   54 | begin
      | ^~~~~
foo.cc:56:9: error: expected unqualified-id before 'while'
   56 |         while queue[tmp]>data do
      |         ^~~~~
foo.cc:58:9: error: 'queue' does not name a type
   58 |         queue[tmp]:=data;
      |         ^~~~~
foo.cc:59:9: error: 'qt' does not name a type
   59 |         qt[tmp]:=id;
      |         ^~
foo.cc:60:9: error: 'qtail' does not name a type
   60 |         qtail:=tmp;
      |         ^~~~~
foo.cc:61:1: error: 'end' does not name a type
   61 | end;
      | ^~~
foo.cc:63:1: error: 'function' does not name a type; did you mean 'union'?
   63 | function find(l:longint):longint;
      | ^~~~~~~~
      | union
foo.cc:64:1: error: 'begin' does not name a type
   64 | begin
      | ^~~~~
foo.cc:66:13: error: expected constructor, destructor, or type conversion before '(' token
   66 |         exit(queue[qhead]);
      |             ^
foo.cc:67:1: error: 'end' does not name a type
   67 | end;
      | ^~~
foo.cc:69:1: error: 'procedure' does not name a type
   69 | procedure initp(x:longint);
      | ^~~~~~~~~
foo.cc:70:1: error: 'begin' does not name a type
   70 | begin
      | ^~~~~
foo.cc:72:1: error: 'end' does not name a type
   72 | end;
      | ^~~
foo.cc:74:1: error: 'procedure' does not name a type
   74 | procedure insert(u,v,w:longint);
      | ^~~~~~~~~
foo.cc:75:1: error: 'var' does not name a type
   75 | var
      | ^~~
foo.cc:77:1: error: 'begin' does not name a type
   77 | begin
      | ^~~~~
foo.cc:79:9: error: 'p' does not name a type
   79 |         p^.data:=v;
      |         ^
foo.cc:80:9: error: 'p' does not name a type
   80 |         p^.w:=w;
      |         ^
foo.cc:81:9: error: 'p' does not name a type
   81 |         p^.next:=head[u];
      |         ^
foo.cc:82:9: error: 'head' does not name a type
   82 |         head[u]:=p;
      |         ^~~~
foo.cc:83:1: error: 'end' does not name a type
   83 | end;
      | ^~~
foo.cc:85:1: error: 'procedure' does not name a type
   85 | procedure inputdata;
      | ^~~~~~~~~
foo.cc:86:1: error: 'var' does not name a type
   86 | var
      | ^~~
foo.cc:88:9: error: 'u' does not name a type
   88 |         u,v,w:longint;
      |         ^
foo.cc:89:1: error: 'begin' does not name a type
   89 | begin
      | ^~~~~
foo.cc:91:15: error: expected constructor, destructor, or type conversion before '(' token
   91 |         readln(n,s);
      |               ^
foo.cc:92:9: error: expected unqualified-id before 'for'
   92 |         for i:=1 to n do
      |         ^~~
foo.cc:94:9: error: expected unqualified-id before 'for'
   94 |         for i:=1 to n-1 do
      |         ^~~
foo.cc:97:23: error: expected constructor, destructor, or type conversion before '(' token
   97 |                 insert(u,v,w);
      |                       ^
foo.cc:98:23: error: expected constructor, destructor, or type conversion before '(' token
   98 |                 insert(v,u,w);
      |                       ^
foo.cc:99:9: error: 'end' does not name a type
   99 |         end;
      |         ^~~
foo.cc:100:1: error: 'end' does not name a type
  100 | end;
      | ^~~
foo.cc:102:1: error: 'procedure' does not name a type
  102 | procedure dfs(id,dist:longint);
      | ^~~~~~~~~
foo.cc:103:1: error: 'var' does not name a type
  103 | var
      | ^~~
foo.cc:105:9: error: 'nowid' does not name a type
  105 |         nowid,nowd:longint;
      |         ^~~~~
foo.cc:106:1: error: 'begin' does not name a type
  106 | begin
      | ^~~~~
foo.cc:108:9: error: 'now' does not name a type
  108 |         now:=head[id];
      |         ^~~
foo.cc:109:9: error: expected unqualified-id before 'while'
  109 |         while now<>nil do
      |         ^~~~~
foo.cc:112:17: error: 'nowd' does not name a type
  112 |                 nowd:=dist+now^.w;
      |                 ^~~~
foo.cc:113:17: error: expected unqualified-id before 'if'
  113 |                 if (not visit[nowid]) and (not flag[nowid]) then
      |                 ^~
foo.cc:116:25: error: 'pred' does not name a type
  116 |                         pred[nowid]:=now^.w;
      |                         ^~~~
foo.cc:117:25: error: expected unqualified-id before 'if'
  117 |                         if nowd>max then
      |                         ^~
foo.cc:120:33: error: 'max' does not name a type
  120 |                                 max:=nowd;
      |                                 ^~~
foo.cc:121:25: error: 'end' does not name a type
  121 |                         end;
      |                         ^~~
foo.cc:122:28: error: expected constructor, destructor, or type conversion before '(' token
  122 |                         dfs(nowid,nowd);
      |                            ^
foo.cc:123:17: error: 'end' does not name a type
  123 |                 end;
      |                 ^~~
foo.cc:124:17: error: 'now' does not name a type
  124 |                 now:=now^.next;
      |                 ^~~
foo.cc:125:9: error: 'end' does not name a type
  125 |         end;
      |         ^~~
foo.cc:126:1: error: 'end' does not name a type
  126 | end;
      | ^~~
foo.cc:128:1: error: 'procedure' does not name a type
  128 | procedure work1;
      | ^~~~~~~~~
foo.cc:129:1: error: 'var' does not name a type
  129 | var
      | ^~~
foo.cc:131:10: error: found ':' in nested-name-specifier, expected '::'
  131 |         i:longint;
      |          ^
      |          ::
foo.cc:131:9: error: 'i' does not name a type
  131 |         i:longint;
      |         ^
foo.cc:132:1: error: 'begin' does not name a type
  132 | begin
      | ^~~~~
foo.cc:134:9: error: 'pre' does not name a type
  134 |         pre[1]:=1;
      |         ^~~
foo.cc:135:12: error: expected constructor, destructor, or type conversion before '(' token
  135 |         dfs(1,0);
      |            ^
foo.cc:136:9: error: 'initdfs' does not name a type
  136 |         initdfs;
      |         ^~~~~~~
foo.cc:137:9: error: 'pre' does not name a type
  137 |         pre[key]:=key;
      |         ^~~
foo.cc:138:9: error: 'pred' does not name a type
  138 |         pred[key]:=0;
      |         ^~~~
foo.cc:139:12: error: expected constructor, destructor, or type conversion before '(' token
  139 |         dfs(key,0);
      |            ^
foo.cc:141:17: error: expected constructor, destructor, or type conversion before '(' token
  141 |         fillchar(sum,sizeof(sum),0);
      |                 ^
foo.cc:142:9: error: 'lists' does not name a type
  142 |         lists:=1;
      |         ^~~~~
foo.cc:143:9: error: 'list' does not name a type
  143 |         list[1]:=key;
      |         ^~~~
foo.cc:144:9: error: 't' does not name a type
  144 |         t:=pred[key];
      |         ^
foo.cc:145:9: error: 'now' does not name a type
  145 |         now:=pre[key];
      |         ^~~
foo.cc:146:9: error: expected unqualified-id before 'while'
  146 |         while pre[now]<>now do
      |         ^~~~~
foo.cc:149:17: error: 'list' does not name a type
  149 |                 list[lists]:=now;
      |                 ^~~~
foo.cc:150:17: error: 'sum' does not name a type
  150 |                 sum[lists]:=sum[lists-1]+t;
      |                 ^~~
foo.cc:151:17: error: 't' does not name a type
  151 |                 t:=pred[now];
      |                 ^
foo.cc:152:17: error: 'now' does not name a type
  152 |                 now:=pre[now];
      |                 ^~~
foo.cc:153:9: error: 'end' does not name a type
  153 |         end;
      |         ^~~
foo.cc:154:12: error: expected constructor, destructor, or type conversion before '(' token
  154 |         inc(lists);
      |            ^
foo.cc:155:9: error: 'list' does not name a type
  155 |         list[lists]:=now;
      |         ^~~~
foo.cc:156:9: error: 'sum' does not name a type
  156 |         sum[lists]:=sum[lists-1]+t;
      |         ^~~
foo.cc:157:9: error: expected unqualified-id before 'for'
  157 |         for i:=1 to lists do
      |         ^~~
foo.cc:159:1: error: 'end' does not name a type
  159 | end;
      | ^~~
foo.cc:161:1: error: 'procedure' does not name a type
  161 | procedure work2;
      | ^~~~~~~~~
foo.cc:162:1: error: 'var' does not name a type
  162 | var
      | ^~~
foo.cc:164:1: error: 'begin' does not name a type
  164 | begin
      | ^~~~~
foo.cc:168:20: error: expected constructor, destructor, or type conversion before '(' token
  168 |                 dfs(list[i],0);
      |                    ^
foo.cc:169:17: error: 'f' does not name a type
  169 |                 f[i]:=max;
      |                 ^
foo.cc:170:9: error: 'end' does not name a type
  170 |         end;
      |         ^~~
foo.cc:171:1: error: 'end' does not name a type
  171 | end;
      | ^~~
foo.cc:173:1: error: 'procedure' does not name a type
  173 | procedure work3;
      | ^~~~~~~~~
foo.cc:174:1: error: 'var' does not name a type
  174 | var
      | ^~~
foo.cc:176:9: error: 'tot' does not name a type
  176 |         tot,tmp:longint;
      |         ^~~
foo.cc:177:1: error: 'begin' does not name a type
  177 | begin
      | ^~~~~
foo.cc:178:25: error: 'initq' does not name a type; did you mean 'int'?
  178 |         ans:=200000000; initq;
      |                         ^~~~~
      |                         int
foo.cc:179:9: error: 'tl' does not name a type
  179 |         tl:=1;  tr:=1;  put(f[1],1);
      |         ^~
foo.cc:179:17: error: 'tr' does not name a type
  179 |         tl:=1;  tr:=1;  put(f[1],1);
      |                 ^~
foo.cc:179:28: error: expected constructor, destructor, or type conversion before '(' token
  179 |         tl:=1;  tr:=1;  put(f[1],1);
      |                            ^
foo.cc:180:9: error: 'repeat' does not name a type
  180 |         repeat
      |         ^~~~~~
foo.cc:184:28: error: expected constructor, destructor, or type conversion before '(' token
  184 |                         put(f[tr],tr);
      |                            ^
foo.cc:185:17: error: 'end' does not name a type
  185 |                 end;
      |                 ^~~
foo.cc:186:17: error: 'tot' does not name a type
  186 |                 tot:=0;
      |                 ^~~
foo.cc:187:17: error: 'tot' does not name a type
  187 |                 tot:=maxf(sum[tl],find(tl));
      |                 ^~~
foo.cc:188:17: error: 'tot' does not name a type
  188 |                 tot:=maxf(tot,sum[lists]-sum[tr]);
      |                 ^~~
foo.cc:189:17: error: 'ans' does not name a type
  189 |                 ans:=minf(ans,tot);
      |                 ^~~
foo.cc:191:20: error: expected constructor, destructor, or type conversion before '(' token
  191 |                 inc(tl);
      |                    ^
foo.cc:192:18: error: expected unqualified-id before 'if'
  192 |                  if tr>=lists then break;
      |                  ^~
foo.cc:193:9: error: 'until' does not name a type
  193 |         until tr=lists;
      |         ^~~~~
foo.cc:194:1: error: 'end' does not name a type
  194 | end;
      | ^~~
foo.cc:196:1: error: 'begin' does not name a type
  196 | begin
      | ^~~~~
foo.cc:198:9: error: 'work1' does not name a type
  198 |         work1;
      |         ^~~~~
foo.cc:199:9: error: 'work2' does not name a type
  199 |         work2;
      |         ^~~~~
foo.cc:200:9: error: 'work3' does not name a type
  200 |         work3;
      |         ^~~~~
foo.cc:201:16: error: expected constructor, destructor, or type conversion before '(' token
  201 |         writeln(ans);
      |                ^
foo.cc:202:1: error: 'end' does not name a type
  202 | end.
      | ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1553 树网的核加强版
语言
C++
递交时间
2022-02-27 17:15:17
评测时间
2022-02-27 18:01:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes