摘要: 1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 5 const int MAXN=50010; 6 int n,k; 7 int head[MAXN*3]; //一倍存同类,一倍存吃,一倍存被吃 8 9 int r 阅读全文
posted @ 2021-10-27 22:02 Hell0er 阅读(60) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 3 using namespace std; 4 5 const int MAXN=10010; 6 7 int n,m; 8 int head[MAXN]; 9 10 int root(int x) //寻找根 11 { 12 if (head[x] 阅读全文
posted @ 2021-10-27 20:31 Hell0er 阅读(18) 评论(0) 推荐(0)