/ Vijos /

记录详情

Compile Error

foo.cc:5:9: error: too many decimal points in number
    5 | t:array[0..400009] of arr;
      |         ^~~~~~~~~
foo.cc:6:17: error: too many decimal points in number
    6 | deep,last:array[0..200009] of longint;
      |                 ^~~~~~~~~
foo.cc:7:9: error: too many decimal points in number
    7 | b:array[0..200009] of boolean; //是不是在最长链上
      |         ^~~~~~~~~
foo.cc:1:1: error: 'type' does not name a type
    1 | type arr=record
      | ^~~~
foo.cc:3:1: error: 'end' does not name a type
    3 | end;
      | ^~~
foo.cc:4:1: error: 'var' does not name a type
    4 | var
      | ^~~
foo.cc:6:1: error: 'deep' does not name a type
    6 | deep,last:array[0..200009] of longint;
      | ^~~~
foo.cc:7:2: error: found ':' in nested-name-specifier, expected '::'
    7 | b:array[0..200009] of boolean; //是不是在最长链上
      |  ^
      |  ::
foo.cc:7:1: error: 'b' does not name a type
    7 | b:array[0..200009] of boolean; //是不是在最长链上
      | ^
foo.cc:8:1: error: 'md' does not name a type
    8 | md,gen,tot,i,x,y,n:longint;
      | ^~
foo.cc:9:1: error: 'procedure' does not name a type
    9 | procedure built(x,y:longint);
      | ^~~~~~~~~
foo.cc:10:1: error: 'begin' does not name a type
   10 | begin
      | ^~~~~
foo.cc:12:1: error: 't' does not name a type
   12 | t[tot].v:=y;
      | ^
foo.cc:13:1: error: 't' does not name a type
   13 | t[tot].next:=last[x];
      | ^
foo.cc:14:1: error: 'last' does not name a type
   14 | last[x]:=tot;
      | ^~~~
foo.cc:15:1: error: 'end' does not name a type
   15 | end;
      | ^~~
foo.cc:16:1: error: 'procedure' does not name a type
   16 | procedure dfs(x,d:longint); //x点的深度为d
      | ^~~~~~~~~
foo.cc:17:1: error: 'var' does not name a type
   17 | var j,p:longint;
      | ^~~
foo.cc:18:1: error: 'begin' does not name a type
   18 | begin
      | ^~~~~
foo.cc:20:1: error: 'j' does not name a type
   20 | j:=last[x];
      | ^
foo.cc:21:1: error: expected unqualified-id before 'while'
   21 | while j<>0 do
      | ^~~~~
foo.cc:24:1: error: expected unqualified-id before 'if'
   24 | if deep[p]=0 then dfs(p,d+1);
      | ^~
foo.cc:25:1: error: 'j' does not name a type
   25 | j:=t[j].next;
      | ^
foo.cc:26:1: error: 'end' does not name a type
   26 | end;
      | ^~~
foo.cc:27:1: error: 'end' does not name a type
   27 | end;
      | ^~~
foo.cc:28:1: error: 'procedure' does not name a type
   28 | procedure zou(x:longint); //寻找哪个点在最长链上 一直向上走 重复的不再走
      | ^~~~~~~~~
foo.cc:29:1: error: 'var' does not name a type
   29 | var p,j:longint;
      | ^~~
foo.cc:30:1: error: 'begin' does not name a type
   30 | begin
      | ^~~~~
foo.cc:32:1: error: 'j' does not name a type
   32 | j:=last[x];
      | ^
foo.cc:33:1: error: expected unqualified-id before 'while'
   33 | while j<>0 do
      | ^~~~~
foo.cc:36:1: error: expected unqualified-id before 'if'
   36 | if (b[p]=false) and (deep[p]<deep[x]) then zou(p);
      | ^~
foo.cc:37:1: error: 'j' does not name a type
   37 | j:=t[j].next;
      | ^
foo.cc:38:1: error: 'end' does not name a type
   38 | end;
      | ^~~
foo.cc:39:1: error: 'end' does not name a type
   39 | end;
      | ^~~
foo.cc:40:1: error: 'begin' does not name a type
   40 | begin
      | ^~~~~
foo.cc:42:1: error: expected unqualified-id before 'for'
   42 | for i:=1 to n-1 do
      | ^~~
foo.cc:45:4: error: expected constructor, destructor, or type conversion before '(' token
   45 | inc(x); inc(y); //编号都加1 方便处理
      |    ^
foo.cc:45:12: error: expected constructor, destructor, or type conversion before '(' token
   45 | inc(x); inc(y); //编号都加1 方便处理
      |            ^
foo.cc:46:6: error: expected constructor, destructor, or type conversion before '(' token
   46 | built(x,y);
      |      ^
foo.cc:47:6: error: expected constructor, destructor, or type conversion before '(' token
   47 | built(y,x);
      |      ^
foo.cc:48:1: error: 'end' does not name a type
   48 | end;
      | ^~~
foo.cc:49:4: error: expected constructor, destructor, or type conversion before '(' token
   49 | dfs(1,1); //第一次dfs 我是用的1为根
      |    ^
foo.cc:50:1: error: expected unqualified-id before 'for'
   50 | for i:=1 to n do
      | ^~~
foo.cc:52:20: error: 'gen' does not name a type
   52 | begin md:=deep[i]; gen:=i; end; //找到最远点
      |                    ^~~
foo.cc:52:28: error: 'end' does not name a type
   52 | begin md:=deep[i]; gen:=i; end; //找到最远点
      |                            ^~~
foo.cc:53:9: error: expected constructor, destructor, or type conversion before '(' token
   53 | fillchar(deep,sizeof(deep),0);
      |         ^
foo.cc:54:4: error: expected constructor, destructor, or type conversion before '(' token
   54 | dfs(gen,1); //第二次dfs
      |    ^
foo.cc:55:1: error: 'md' does not name a type
   55 | md:=0;
      | ^~
foo.cc:56:1: error: expected unqualified-id before 'for'
   56 | for i:=1 to n do
      | ^~~
foo.cc:58:9: error: expected constructor, destructor, or type conversion before '(' token
   58 | fillchar(b,sizeof(b),false);
      |         ^
foo.cc:59:1: error: expected unqualified-id before 'for'
   59 | for i:=1 to n do //然后开始走
      | ^~~
foo.cc:62:9: error: expected constructor, destructor, or type conversion before '(' token
   62 | fillchar(deep,sizeof(deep),0);
      |         ^
foo.cc:63:1: error: expected unqualified-id before 'for'
   63 | for i:=1 to n do
      | ^~~
foo.cc:65:4: error: expected constructor, destructor, or type conversion before '(' token
   65 | dfs(gen,1); //第三次dfs
      |    ^
foo.cc:66:1: error: expected unqualified-id before 'for'
   66 | for i:=1 to n do //再走一次
      | ^~~
foo.cc:68:1: error: expected unqualified-id before 'for'
   68 | for i:=1 to n do //输出时序号减1
      | ^~~
foo.cc:70:1: error: 'end' does not name a type
   70 | end.
      | ^~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1476 旅游规划(csapc)
语言
C++
递交时间
2022-02-27 17:07:20
评测时间
2022-02-27 17:07:20
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes