原文题意描述中,
Since rapping is such a subtle art, two robots can never have the same skill level
翻译过来是 : 两个机器人永远不会有相同的技能水平,
即每个比赛都有结果(这个问题不大).
原文输入格式中
No two rap battles involve the same pair of robots
即两点间没有多重边, 这样就不需要在计算拓扑序时判断多重边, 例如第一篇 O(n) 题解就不需要
if(dfn[y]==dfn[x]+1)ID[y]=min(ID[y],id[i]);也可 AC
蒟蒻刚学拓扑排序 可能对题解理解有误 也有可能是数据的问题