摘要:
选择排序 // // Created by 29273 on 2022-03-16. // #include "bits/stdc++.h" using namespace std; int n; int a[100]; void selectSort() { for (int i = 1; i < 阅读全文
摘要:
冒泡排序 // // Created by 29273 on 2022-03-16. // #include "bits/stdc++.h" using namespace std; int a[100]; int n; void bubbleSort() { int flag; for (int 阅读全文
摘要:
二分查找模板 // // Created by 29273 on 2022-03-16. // #include "bits/stdc++.h" using namespace std; int n,x; int a[100]; int binarySearch(int x) { int low = 阅读全文
摘要:
最短路prim算法模板,仅作记录 // // Created by 29273 on 2022-02-23. // Prim 最短路径算法模板 #include<iostream> #include "bits/stdc++.h" using namespace std; const int max 阅读全文
摘要:
简单dfs 对于每一个不为‘0’且未被访问的地方开始dfs搜索,将其连通不为‘0’的地方vis数组置为0(之后无需访问访问),ans++。 // // Created by 29273 on 2022-03-09. // #include "bits/stdc++.h" using namespac 阅读全文