
拓扑排序
文章平均质量分 82
cloudy_happy
像我这样优秀的人,不该平凡过一生
展开
-
HDU1258确定比赛名次 拓扑排序
确定比赛名次 有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。 Input 输入有若干组,每组中的第一行为二个数N(1<=N<=...原创 2018-08-06 10:56:37 · 307 阅读 · 0 评论 -
poj2367Genealogical tree 拓扑排序
Genealogical tree The system of Martians' blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather together in different groups, so that a Martia...原创 2018-08-06 12:00:11 · 192 阅读 · 0 评论