1st and 3rd part must have the same length x
Maybe that's the reason why he's still gray.
I print nothing and got WA at first...
An edge from u to v doesn't mean that u is the parent of v if we build the tree from root 1
There's a template function in c++17 names "std::data", which makes your data variable ambiguous
OMG... I tried to calculate the MIN danger, which should be 2^(n — v) where v is the vertices number of the max complete sub-graph, which is NP... it bordered me so long since I find that it's just a misunderstanding when reading this....