摘要: 题目:我已经明示到这个程度了你还不用并查集? #include<bits/stdc++.h> using namespace std; const int MAXN=1010; int F[MAXN]; int GetFather(int x) { return F[x]==x?x:F[x]=Get 阅读全文
posted @ 2020-12-19 16:04 Do1phln 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 思路 prim的最小生成树,套上肝就完事了 代码 #include<iostream> #include<cstdio> #include<string.h> #define MAX 999999; using namespace std; int map[105][105],dist[105]; 阅读全文
posted @ 2020-12-19 16:03 Do1phln 阅读(79) 评论(0) 推荐(0) 编辑
摘要: P200汉诺塔 #include<bits/stdc++.h> using namespace std; int main() { int n,i; long long s[40]; s[1]=2; for(i=2;i<=35;i++) s[i]=3*s[i-1]+2; while(cin>>n) 阅读全文
posted @ 2020-12-19 16:02 Do1phln 阅读(104) 评论(0) 推荐(0) 编辑