
图
幽殇默
他时若遂凌云志,敢笑黄巢不丈夫。
展开
-
1129. 热浪【最短路】
https://www.acwing.com/problem/content/description/1131/ #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N=2510; int g[N][N]; int dist[N]; bool st[N]; int startx,endx; int n,.原创 2021-05-21 22:17:05 · 148 阅读 · 0 评论 -
1192. 奖金 【有意思的拓扑排序】
https://www.acwing.com/problem/content/description/1194/ 拓扑排序: 反向建边。 #include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<vector> #include<cstring> using namespace std; const int N=1e4*2+10;.原创 2021-05-21 20:02:27 · 232 阅读 · 0 评论 -
1191. 家谱树 【拓扑排序】
https://www.acwing.com/problem/content/description/1193/ #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<queue> #include<vector> using namespace std; const int N=110; const int M=660; .原创 2021-05-21 19:01:49 · 145 阅读 · 0 评论 -
1639. 拓扑顺序
https://www.acwing.com/problem/content/description/1641/ #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<queue> using namespace std; const int N=1e3+10; const int M=1e4+10; int h[N],e[M],ne[.原创 2021-05-21 17:32:40 · 123 阅读 · 0 评论 -
可达性统计 【没有做出来】
https://ac.nowcoder.com/acm/contest/1013/A 正解是: 拓扑排序 自己太垃圾拓扑排序不是太熟练,只会暴力。 #include<cstdio> #include<iostream> #include<cstring> using namespace std; const int N=1e4*3+10; int h[N],e[N],ne[N],idx; bool st[N]; int n,m; void add(int a,int .原创 2021-05-20 22:36:32 · 110 阅读 · 0 评论