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_36900555_15629.cpp:3:1: error: 'vector' does not name a type
 vector<int>g[maxnum];
 ^
0_0_36900555_15629.cpp:4:1: error: 'vector' does not name a type
 vector<int>gg[maxnum];
 ^
0_0_36900555_15629.cpp:5:9: error: 'maxnum' was not declared in this scope
 int ans[maxnum];
         ^
0_0_36900555_15629.cpp: In function 'void dfs(int, int)':
0_0_36900555_15629.cpp:7:2: error: 'ans' was not declared in this scope
  ans[u] = ans[f] + 1;
  ^
0_0_36900555_15629.cpp:8:15: error: 'gg' was not declared in this scope
  for (int v : gg[u])dfs(v, u);
               ^
0_0_36900555_15629.cpp: At global scope:
0_0_36900555_15629.cpp:11:7: error: 'maxnum' was not declared in this scope
 int a[maxnum];
       ^
0_0_36900555_15629.cpp: In function 'bool cmp(int, int)':
0_0_36900555_15629.cpp:13:9: error: 'a' was not declared in this scope
  return a[x] < a[y];
         ^
0_0_36900555_15629.cpp: In function 'void slove()':
0_0_36900555_15629.cpp:16:2: error: 'cin' was not declared in this scope
  cin >> n;
  ^
0_0_36900555_15629.cpp:17:2: error: 'UF' was not declared in this scope
  UF uf = UF(n);
  ^
0_0_36900555_15629.cpp:18:30: error: 'g' was not declared in this scope
  for (int i = 1; i <= n; i++)g[i].clear(), gg[i].clear(), ans[i] = 0;
                              ^
0_0_36900555_15629.cpp:18:44: error: 'gg' was not declared in this scope
  for (int i = 1; i <= n; i++)g[i].clear(), gg[i].clear(), ans[i] = 0;
                                            ^
0_0_36900555_15629.cpp:18:59: error: 'ans' was not declared in this scope
  for (int i = 1; i <= n; i++)g[i].clear(), gg[i].clear(), ans[i] = 0;
                                                           ^
0_0_36900555_15629.cpp:21:3: error: 'g' was not declared in this scope
   g[u].push_back(v);
   ^
0_0_36900555_15629.cpp:24:37: error: 'a' was not declared in this scope
  for (int i = 1; i <= n; i++)cin >> a[i];
                                     ^
0_0_36900555_15629.cpp:25:2: error: 'vector' was not declared in this scope
  vector<int>vec; for (int i = 1; i <= n; i++)vec.push_back(i);
  ^
0_0_36900555_15629.cpp:25:9: error: expected primary-expression before 'int'
  vector<int>vec; for (int i = 1; i <= n; i++)vec.push_back(i);
         ^
0_0_36900555_15629.cpp:25:46: error: 'vec' was not declared in this scope
  vector<int>vec; for (int i = 1; i <= n; i++)vec.push_back(i);
                                              ^
0_0_36900555_15629.cpp:26:7: error: 'vec' was not declared in this scope
  sort(vec.begin(), vec.end(), cmp);
       ^
0_0_36900555_15629.cpp:26:34: error: 'sort' was not declared in this scope
  sort(vec.begin(), vec.end(), cmp);
                                  ^
0_0_36900555_15629.cpp:27:15: error: unable to deduce 'auto&&' from 'vec'
  for (int u : vec) {
               ^
0_0_36900555_15629.cpp:28:16: error: 'g' was not declared in this scope
   for (int v : g[u]) {
                ^
0_0_36900555_15629.cpp:29:8: error: 'a' was not declared in this scope
    if (a[v] < a[u]) {
        ^
0_0_36900555_15629.cpp:30:10: error: 'uf' was not declared in this scope
     if (!uf.connect(v, u)) {
          ^
0_0_36900555_15629.cpp:33:6: error: 'gg' was not declared in this scope
      gg[u].push_back(ft);
      ^
0_0_36900555_15629.cpp:39:30: error: 'cout' was not declared in this scope
  for (int i = 1; i <= n; i++)cout << ans[i] << endl;
                              ^
0_0_36900555_15629.cpp:39:38: error: 'ans' was not declared in this scope
  for (int i = 1; i <= n; i++)cout << ans[i] << endl;
                                      ^
0_0_36900555_15629.cpp:39:48: error: 'endl' was not declared in this scope
  for (int i = 1; i <= n; i++)cout << ans[i] << endl;
                                                ^


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-25 03:50:43, Gzip enabled