/ Vijos /

记录详情

Compile Error

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

信息

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