![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM 图论---拓扑排序
文章平均质量分 79
Angel_XiaoXiong
算法渣渣
展开
-
poj1094Sorting It All Out
http://poj.org/problem?id=1094#include#includeint map[27][27],indegree[27],q[27];//q[]存储序列值int TopoSort(int n) //拓扑排序 { int c=0,temp[27],loc,m,flag=1,i,j;//flag=1:有序 flag=-1:不确定 for(i=1;原创 2016-06-08 22:39:10 · 236 阅读 · 0 评论 -
hdu1285确定比赛名次
http://acm.hdu.edu.cn/showproblem.php?pid=1285拓扑排序,邻接矩阵存储,注意重边#include #include int adjMatrix[501][501],indegree[501];int n,m;void initTopo(){ int p1,p2; memset(indegree,0,sizeof(inde原创 2016-06-06 13:23:06 · 267 阅读 · 0 评论