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_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
    2 | vector<vector<int>> e(N), dp(N, vector<int>(2));
      |        ^~~~~~
0_0_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
0_0_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
0_0_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
0_0_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
0_0_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
0_0_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
0_0_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
0_0_39332090_9737.cpp:2:8: error: 'vector' was not declared in this scope
0_0_39332090_9737.cpp:2:1: error: 'vector' does not name a type
    2 | vector<vector<int>> e(N), dp(N, vector<int>(2));
      | ^~~~~~
0_0_39332090_9737.cpp: In function 'void dfs(int)':
0_0_39332090_9737.cpp:5:21: error: 'e' was not declared in this scope
    5 |     for (int next : e[cur])
      |                     ^
0_0_39332090_9737.cpp:8:9: error: 'dp' was not declared in this scope
    8 |         dp[cur][0] += dp[next][1];
      |         ^~
0_0_39332090_9737.cpp:9:23: error: 'min' was not declared in this scope
    9 |         dp[cur][1] += min(dp[next][1], dp[next][0]);
      |                       ^~~
0_0_39332090_9737.cpp: In function 'void solve()':
0_0_39332090_9737.cpp:15:12: error: 'cin' was not declared in this scope
   15 |     while (cin >> n)
      |            ^~~
0_0_39332090_9737.cpp:18:13: error: 'e' was not declared in this scope
   18 |             e[i].clear();
      |             ^
0_0_39332090_9737.cpp:20:13: error: 'dp' was not declared in this scope
   20 |             dp[i][0] = 0, dp[i][1] = 1;
      |             ^~
0_0_39332090_9737.cpp:33:17: error: 'e' was not declared in this scope
   33 |                 e[u].push_back(v);
      |                 ^
0_0_39332090_9737.cpp:37:9: error: 'cout' was not declared in this scope
   37 |         cout << min(dp[root][0], dp[root][1]) << "\n";
      |         ^~~~
0_0_39332090_9737.cpp:37:21: error: 'dp' was not declared in this scope
   37 |         cout << min(dp[root][0], dp[root][1]) << "\n";
      |                     ^~
0_0_39332090_9737.cpp:37:17: error: 'min' was not declared in this scope
   37 |         cout << min(dp[root][0], dp[root][1]) << "\n";
      |                 ^~~


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-12-05 11:45:36, Gzip enabled