You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
569 B

#include <bits/stdc++.h>
using namespace std;
const int N = 110;
// 并查集
int p[N];
int find(int x) {
if (x == p[x]) return x;
return p[x] = find(p[x]);
}
// 合并集合
bool join(int a, int b) {
if (find(a) == find(b)) return false;
p[find(a)] = find(b);
return true;
}
int main() {
int n;
cin >> n;
// 初始化并查集
for (int i = 1; i <= n; i++) p[i] = i;
for (int i = 1; i <= n; i++) {
int x1, y1, x2, y2;
cin >> x1 >> y1 >> x2 >> y2;
}
return 0;
}