PTAL3-003 社交集群(并查集)
浅用一下并查集 也可以用带权并查集
#include<bits/stdc++.h>
using namespace std;
map<int,int>mp;
const int maxn=305;
//bool number[maxn + 5];
int n,m,sum,cnt;
#define PI 3.141592653
typedef long long ll;
//ll dp[100000];
//int v[100000];
int p[100000];
int .
原创
2022-03-22 20:40:24 ·
420 阅读 ·
0 评论