对于已经给出的某些固定的边直接算在里面即可,因为有并查集维护。
#include <bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
#define ll long long
#define x first
#define y second
typedef pair<int,int> PII;
const int N=1e4+10;
int n,m,k,ans,ecnt;
int fa[N],head
对于已经给出的某些固定的边直接算在里面即可,因为有并查集维护。
#include <bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
#define ll long long
#define x first
#define y second
typedef pair<int,int> PII;
const int N=1e4+10;
int n,m,k,ans,ecnt;
int fa[N],head