![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
拓扑排序
文章平均质量分 76
KirinSB
这个作者很懒,什么都没留下…
展开
-
HDU 1285 确定比赛名次(拓扑排序)题解
Problem Description有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。 Input输入有若干组,每组中的第一行为二个数N(1<=N&...原创 2018-04-23 20:33:03 · 300 阅读 · 0 评论 -
HDU 1811(并查集+拓扑排序)题解
Problem Description自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果两个人具有相同的Rating,那就按这几个人的RP从高到低来排...原创 2018-04-24 17:02:43 · 344 阅读 · 0 评论 -
POJ 1270 Following Orders(拓扑排序)题解
DescriptionOrder is an important concept in mathematics and in computer science. For example, Zorn's Lemma states: ``a partially ordered set in which every chain has an upper bound contains a maximal ...原创 2018-05-01 14:09:59 · 219 阅读 · 0 评论 -
POJ 3687 Labeling Balls(拓扑排序)题解
DescriptionWindy has N balls of distinct weights from 1 unit to N units. Now he tries to label them with 1 to N in such a way that:No two balls share the same label.The labeling satisfies several cons...原创 2018-05-01 15:55:08 · 178 阅读 · 0 评论 -
POJ1128 Frame Stacking(拓扑排序+dfs)题解
DescriptionConsider the following 5 picture frames placed on an 9 x 8 array. ........ ........ ........ ........ .CCC.... EEEEEE.. ........ ........ ..BBBB.. .C.C.... E....E.. DDDDDD.. ........ ..B....原创 2018-05-05 21:39:28 · 177 阅读 · 0 评论