hdu1285确定比赛名次(字典序最小的拓扑排序)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1285

注意重边影响入度

#include
#include
using namespace std;
const int num=505;
int map[num][num],in[num],n,m,ans[num],cnt;
void topo()
{
    int i,j,t;
    for(i=0;i

你可能感兴趣的:(图论—拓扑排序)