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_28198055_6034.cpp:1:1: error: 'include' does not name a type
 include <bits/stdc++.h>
 ^
0_0_28198055_6034.cpp:9:1: error: 'vector' does not name a type
 vector<edge> G[maxn];
 ^
0_0_28198055_6034.cpp: In function 'void dfs1(int, int)':
0_0_28198055_6034.cpp:12:17: error: 'G' was not declared in this scope
  for(int i=0; i<G[x].size(); i++) {
                 ^
0_0_28198055_6034.cpp:16:29: error: 'w' was not declared in this scope
   if(dp[0][x] < dp[0][to] + w) {
                             ^
0_0_28198055_6034.cpp:21:17: error: 'G' was not declared in this scope
  for(int i=0; i<G[x].size(); i++) {
                 ^
0_0_28198055_6034.cpp:25:28: error: 'w' was not declared in this scope
   dp[1][x] = max(dp[1][x], w + dp[0][to]);
                            ^
0_0_28198055_6034.cpp:25:41: error: 'max' was not declared in this scope
   dp[1][x] = max(dp[1][x], w + dp[0][to]);
                                         ^
0_0_28198055_6034.cpp: In function 'void dfs2(int, int)':
0_0_28198055_6034.cpp:29:17: error: 'G' was not declared in this scope
  for(int i=0; i<G[x].size(); i++) {
                 ^
0_0_28198055_6034.cpp:33:38: error: 'max' was not declared in this scope
    dp[2][to] = max(dp[2][x], dp[1][x]) + w;
                                      ^
0_0_28198055_6034.cpp:33:42: error: 'w' was not declared in this scope
    dp[2][to] = max(dp[2][x], dp[1][x]) + w;
                                          ^
0_0_28198055_6034.cpp:35:38: error: 'max' was not declared in this scope
    dp[2][to] = max(dp[2][x], dp[0][x]) + w;
                                      ^
0_0_28198055_6034.cpp:35:42: error: 'w' was not declared in this scope
    dp[2][to] = max(dp[2][x], dp[0][x]) + w;
                                          ^
0_0_28198055_6034.cpp: In function 'int main()':
0_0_28198055_6034.cpp:42:22: error: 'scanf' was not declared in this scope
  while(scanf("%d", &n) != EOF) {
                      ^
0_0_28198055_6034.cpp:42:27: error: 'EOF' was not declared in this scope
  while(scanf("%d", &n) != EOF) {
                           ^
0_0_28198055_6034.cpp:43:27: error: 'memset' was not declared in this scope
   memset(dp, 0, sizeof(dp));
                           ^
0_0_28198055_6034.cpp:44:26: error: 'G' was not declared in this scope
   for(int i=1; i<=n; i++)G[i].clear();
                          ^
0_0_28198055_6034.cpp:48:4: error: 'G' was not declared in this scope
    G[i].push_back(edge(a, b));
    ^
0_0_28198055_6034.cpp:54:41: error: 'max' was not declared in this scope
    printf("%d\n", max(dp[0][i], dp[2][i]));
                                         ^
0_0_28198055_6034.cpp:54:42: error: 'printf' was not declared in this scope
    printf("%d\n", max(dp[0][i], dp[2][i]));
                                          ^


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-29 18:43:09, Gzip enabled