摘要:
题目是让找一个长度不为一的环,用DFS即可。 #include <iostream> #include <cstring> using namespace std; char mp[510][510]; bool vis[210][210]; int n, m; int fx[] = {0, 0, 阅读全文
摘要:
####小字辈 比赛的时候心烦意乱,没有净下心来好好看题,导致没有看懂。遂考后又做了一遍,觉得方法很好 用的是并查集+路径优化 #include <iostream> using namespace std; const int N = 1e5 + 10; int p[N], c[N]; int f 阅读全文