摘要:
时间复杂度 N*M≈2.5e6 #include <bits/stdc++.h> using namespace std; int n = 510, m; const int N = 510; vector<pair<int,int>> path; // 储存所有边 int p[N]; // 储存祖 阅读全文
posted @ 2024-08-29 22:02
Frodnx
阅读(11)
评论(0)
推荐(0)
摘要:
#include <bits/stdc++.h> using namespace std; const int N = 1000; int p[N]; int find(int x) { if(p[x] != x) p[x] = find(p[x]); return p[x]; } int main 阅读全文
posted @ 2024-08-29 19:45
Frodnx
阅读(10)
评论(0)
推荐(0)
浙公网安备 33010602011771号