F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39389365_2671.cpp: In function 'void dfs(int, int, bool)':
0_0_39389365_2671.cpp:11:40: error: 'd1' was not declared in this scope
   11 |                 v!=fa&&(!o?(dfs(v,u,o),d1[v]+w>d1[u]?(d2[u]=d1[u],d1[u]=d1[v]+w):d1[v]+w>d2[u]&&(d2[u]=d1[v]+w)):(d3[v]=max(d3[u]+w,(d1[u]!=d1[v]+w?d1[u]:d2[u])+w),dfs(v,u,o),1));
      |                                        ^~
0_0_39389365_2671.cpp:11:55: error: 'd2' was not declared in this scope
   11 |                 v!=fa&&(!o?(dfs(v,u,o),d1[v]+w>d1[u]?(d2[u]=d1[u],d1[u]=d1[v]+w):d1[v]+w>d2[u]&&(d2[u]=d1[v]+w)):(d3[v]=max(d3[u]+w,(d1[u]!=d1[v]+w?d1[u]:d2[u])+w),dfs(v,u,o),1));
      |                                                       ^~
0_0_39389365_2671.cpp:11:115: error: 'd3' was not declared in this scope
   11 |                 v!=fa&&(!o?(dfs(v,u,o),d1[v]+w>d1[u]?(d2[u]=d1[u],d1[u]=d1[v]+w):d1[v]+w>d2[u]&&(d2[u]=d1[v]+w)):(d3[v]=max(d3[u]+w,(d1[u]!=d1[v]+w?d1[u]:d2[u])+w),dfs(v,u,o),1));
      |                                                                                                                   ^~
0_0_39389365_2671.cpp: In function 'int work()':
0_0_39389365_2671.cpp:15:17: error: 'd1' was not declared in this scope
   15 |                 d1[i]=d2[i]=d3[i]=0;
      |                 ^~
0_0_39389365_2671.cpp:15:23: error: 'd2' was not declared in this scope
   15 |                 d1[i]=d2[i]=d3[i]=0;
      |                       ^~
0_0_39389365_2671.cpp:15:29: error: 'd3' was not declared in this scope
   15 |                 d1[i]=d2[i]=d3[i]=0;
      |                             ^~
0_0_39389365_2671.cpp:21:33: error: 'd1' was not declared in this scope; did you mean 'd'?
   21 |                         d=max(d,d1[i]+d2[i]);
      |                                 ^~
      |                                 d
0_0_39389365_2671.cpp:21:39: error: 'd2' was not declared in this scope; did you mean 'd'?
   21 |                         d=max(d,d1[i]+d2[i]);
      |                                       ^~
      |                                       d
0_0_39389365_2671.cpp:22:35: error: 'd3' was not declared in this scope; did you mean 'd'?
   22 |                         max(d1[i],d3[i])<r&&(r=max(d1[i],d2[i]),x=i);
      |                                   ^~
      |                                   d


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 22:02:12, Gzip enabled