摘要:
-2025/11/28 阅读全文
posted @ 2025-11-28 23:00
XYu1230
阅读(3)
评论(0)
推荐(0)
摘要:
三分 #include<bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int n; typedef struct{ int x,y; }Point; Point p[N]; double check(double x){ do 阅读全文
posted @ 2025-11-28 23:00
XYu1230
阅读(4)
评论(0)
推荐(0)
摘要:
#include<bits/stdc++.h> using namespace std; const int N = 1e6 + 10; int n; int prime[N]; bool st[N]; int cnt; //埃式筛法 void ai_prime(int x){ for(int i 阅读全文
posted @ 2025-11-28 23:00
XYu1230
阅读(4)
评论(0)
推荐(0)
摘要:
拓扑排序 #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int e[N], ne[N], h[N], idx; int n, m, d[N]; int q[N]; void add(int a,int b) 阅读全文
posted @ 2025-11-28 23:00
XYu1230
阅读(3)
评论(0)
推荐(0)
摘要:
prim算法 #include<bits/stdc++.h> using namespace std; const int N = 510, INF = 0x3f3f3f3f; int g[N][N]; int n, m; int dist[N] , st[N]; int prim(){ memse 阅读全文
posted @ 2025-11-28 23:00
XYu1230
阅读(3)
评论(0)
推荐(0)
摘要:
Kruskal算法 #include<bits/stdc++.h> using namespace std; const int N = 2e5 + 10; struct Edge{ int a,b,c; bool operator<(const Edge &edge) const{ return 阅读全文
posted @ 2025-11-28 23:00
XYu1230
阅读(4)
评论(0)
推荐(0)
摘要:
spfa求最短路 #include <bits/stdc++.h> using namespace std; const int N = 150010; typedef pair<int,int> PII; int e[N], h[N], ne[N], w[N], idx; int n, m; in 阅读全文
posted @ 2025-11-28 23:00
XYu1230
阅读(3)
评论(0)
推荐(0)

浙公网安备 33010602011771号