拓扑排序 C++ 代码
拓扑排序 C++ 代码
/**Program:TopologicalSort*Author:Yee-fan Zhu*/#include <fstream>using namespace std;ifstream fin("topo.in");ofstream fout("topo.out");bool TopologicalSort(int a[][101],int *ans) //可以完成拓扑排序则返回True { int n = a[0][0], i, j; & ...