摘要: 题目链接 https://www.luogu.com.cn/problem/P1807 拓扑排序求DAG(有向无环图)的最长路。 放AC代码 1 #include<bits/stdc++.h> 2 #define MAX 50010 3 using namespace std; 4 int n,m, 阅读全文
posted @ 2022-05-11 20:56 爱吃虾滑 阅读(42) 评论(0) 推荐(0)
摘要: 题目链接 https://acm.sdut.edu.cn/onlinejudge3/contests/3990/problems/A 判定拓扑序列模板题 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n,m,flag; 4 int ma 阅读全文
posted @ 2022-05-11 15:53 爱吃虾滑 阅读(40) 评论(0) 推荐(0)