HDU5195DZYLovesTopologicalSorting如何实现拓扑排序?
- 内容介绍
- 文章标签
- 相关推荐
本文共计406个文字,预计阅读时间需要2分钟。
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5195(中文)http://bestcoder.hdu.edu.cn/contest题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5195(中文)http://bestcoder.hdu.edu.cn/contests/contest_chinese
bc(中文):bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=573 8 9 const int maxn = 1e5 + 10;10 const int INF = 0x3f3f3f3f;11 12 int n, m, k;13 14 struct Node {15 int v, flag;16 Node(int v,int flag=0):v(v),flag(flag){}17 Node() { flag = 0; }18 };19 20 vector head[maxn];21 int ind[maxn],done[maxn];22 23 void init() {24 for (int i = 0; i HDU 5195 DZY Loves Topological Sorting 拓扑排序
本文共计406个文字,预计阅读时间需要2分钟。
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5195(中文)http://bestcoder.hdu.edu.cn/contest题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5195(中文)http://bestcoder.hdu.edu.cn/contests/contest_chinese
bc(中文):bestcoder.hdu.edu.cn/contests/contest_chineseproblem.php?cid=573 8 9 const int maxn = 1e5 + 10;10 const int INF = 0x3f3f3f3f;11 12 int n, m, k;13 14 struct Node {15 int v, flag;16 Node(int v,int flag=0):v(v),flag(flag){}17 Node() { flag = 0; }18 };19 20 vector head[maxn];21 int ind[maxn],done[maxn];22 23 void init() {24 for (int i = 0; i HDU 5195 DZY Loves Topological Sorting 拓扑排序

