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_39498753_18114.cpp:1:6: error: 'vector' in namespace 'std' does not name a template type
    1 | std::vector<int> hs(n + 1), sz(n + 1, 1);
      |      ^~~~~~
0_0_39498753_18114.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
  +++ |+#include <vector>
    1 | std::vector<int> hs(n + 1), sz(n + 1, 1);
0_0_39498753_18114.cpp:2:22: error: non-local lambda expression cannot have a capture-default
    2 |         auto dfs0 = [&](auto self, int x, int fx) -> void {
      |                      ^
0_0_39498753_18114.cpp: In lambda function:
0_0_39498753_18114.cpp:3:31: error: 'adj' was not declared in this scope
    3 |                 for (auto y : adj[x]) {
      |                               ^~~
0_0_39498753_18114.cpp:8:29: error: 'sz' was not declared in this scope
    8 |                         if (sz[y] > sz[hs[x]]) {
      |                             ^~
0_0_39498753_18114.cpp:8:40: error: 'hs' was not declared in this scope
    8 |                         if (sz[y] > sz[hs[x]]) {
      |                                        ^~
0_0_39498753_18114.cpp: At global scope:
0_0_39498753_18114.cpp:13:13: error: expected constructor, destructor, or type conversion before '(' token
   13 |         dfs0(dfs0, 1, 0);
      |             ^


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-15 11:29:16, Gzip enabled