This commit is contained in:
Zengtudor 2024-09-19 18:54:22 +08:00
parent a5cbcc6ca9
commit d209ee216f
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,4 @@
#include <algorithm>
#include <bits/stdc++.h> #include <bits/stdc++.h>
using namespace std; using namespace std;
@ -5,6 +6,11 @@ int a[11]={5, 13, 19, 21, 37, 56, 64, 75, 80, 88, 92};
int main() int main()
{ {
//C++ stl 二分查找
// std::upper_bound()
// std::lower_bound()
int x; int x;
cin>>x; cin>>x;
int l=0,r=10; int l=0,r=10;

View File

@ -1,3 +1,4 @@
#include <algorithm>
#include<bits/stdc++.h> #include<bits/stdc++.h>
using namespace std; using namespace std;
bool book[10]; //false表示没用过 bool book[10]; //false表示没用过
@ -14,6 +15,8 @@ void print()
void dfs(int step) void dfs(int step)
{ {
//C++ stl
//std::next_permutation()
if(step==5) if(step==5)
{ {
print(); print();

View File

@ -1,4 +1,5 @@
#include <bits/stdc++.h> #include <bits/stdc++.h>
#include <variant>
using namespace std; using namespace std;
struct edge { struct edge {
@ -26,7 +27,7 @@ int main() {
graph[a].push_back({b,c}); graph[a].push_back({b,c});
graph[b].push_back({a,c}); graph[b].push_back({a,c});
} }
for (int i = 1; i <= n; i++) { for (int i = 1; i <= n; i++) {
dis[i]=INT_MAX/2; dis[i]=INT_MAX/2;
} }
visit[1]=true; visit[1]=true;