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_39009476_31715.cpp:4:1: error: 'vector' does not name a type
    4 | vector<int> G[N];
      | ^~~~~~
0_0_39009476_31715.cpp:24:1: error: 'vector' does not name a type
   24 | vector<atom> A[N];
      | ^~~~~~
0_0_39009476_31715.cpp: In function 'void dfs(int)':
0_0_39009476_31715.cpp:28:16: error: 'G' was not declared in this scope
   28 |   for (int v : G[u]) {
      |                ^
0_0_39009476_31715.cpp: In function 'void dfs2(int, z)':
0_0_39009476_31715.cpp:35:16: error: 'G' was not declared in this scope
   35 |   for (int v : G[u]) {
      |                ^
0_0_39009476_31715.cpp:38:16: error: 'G' was not declared in this scope
   38 |   for (int v : G[u]) {
      |                ^
0_0_39009476_31715.cpp: In function 'z sol1()':
0_0_39009476_31715.cpp:56:20: error: 'A' was not declared in this scope
   56 |     for (auto &x : A[u]) {
      |                    ^
0_0_39009476_31715.cpp: In function 'z sol2()':
0_0_39009476_31715.cpp:66:20: error: 'A' was not declared in this scope
   66 |     for (auto &x : A[u]) {
      |                    ^
0_0_39009476_31715.cpp: In function 'int main()':
0_0_39009476_31715.cpp:75:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   75 |   cin.tie(0)->sync_with_stdio(0);
      |   ^~~
      |   std::cin
In file included from .\stdc++.h:146:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
0_0_39009476_31715.cpp:82:34: error: 'G' was not declared in this scope
   82 |     for (int i = 1; i <= n; i++) G[i].clear(), A[i].clear();
      |                                  ^
0_0_39009476_31715.cpp:82:48: error: 'A' was not declared in this scope
   82 |     for (int i = 1; i <= n; i++) G[i].clear(), A[i].clear();
      |                                                ^
0_0_39009476_31715.cpp:85:7: error: 'G' was not declared in this scope
   85 |       G[fa].push_back(i);
      |       ^
0_0_39009476_31715.cpp:90:20: error: 'G' was not declared in this scope
   90 |       for (int v : G[u]) A[u].push_back({siz[v], sumsub[v]});
      |                    ^
0_0_39009476_31715.cpp:90:26: error: 'A' was not declared in this scope
   90 |       for (int v : G[u]) A[u].push_back({siz[v], sumsub[v]});
      |                          ^
0_0_39009476_31715.cpp:91:7: error: 'A' was not declared in this scope
   91 |       A[u].push_back({n - siz[u], sumall[fa[u]] - sumsub[u] - siz[u]});
      |       ^
0_0_39009476_31715.cpp:96:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   96 |     cout << (sol1() - sol2()).x << '\n';
      |     ^~~~
      |     std::cout
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~


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-22 22:15:35, Gzip enabled