Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>#include <vector>#include <string>#include <map>#include <set>#include <iostream>#include <fstream>#include <cstdlib>#include <stack>#include <queue>using namespace std;#define Fill(a, b) memset(a, b, sizeof(a))#define Debug(x) cout << #x << "=" << (x) << endl;typedef long long LL;const LL inf = 1LL << 61;const LL mod = 1000000007;#define DEBUG#ifdef DEBUG#endifconst int maxn = 1e5+10;int ans = 0;int sz[maxn];vector<int> tree[maxn];int dfs(int u, int fa){