P3367 【模板】并查集#include<bits/stdc++.h>using namespace std;template <typename T> void debug(string s, T x) { cout << s << "=" << x << "\n"; }typedef long long ll;typedef unsigned long long ull;typedef pair<ll, ll&g