![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
拓扑排序
楚江枫
不忘初心,方得始终
展开
-
【HDU 5695 Gym Class】
Gym ClassProblem Description 众所周知,度度熊喜欢各类体育活动。今天,它终于当上了梦寐以求的体育课老师。第一次课上,它发现一个有趣的事情。在上课之前,所有同学要排成一列, 假设最开始每个人有一个唯一的ID,从1到N,在排好队之后,每个同学会找出包括自己在内的前方所有同学的最小ID,作为自己评价这堂课的分数。麻烦的是,有一些同学不希望某个(些)同学排在他(她)前面,在满足原创 2016-08-16 20:30:05 · 335 阅读 · 0 评论 -
【POJ 2367 Genealogical tree】
Genealogical treeDescriptionThe 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 M原创 2016-08-05 17:32:15 · 289 阅读 · 0 评论 -
【HUD 杭电 4857 逃生】
逃生Problem Description 糟糕的事情发生啦,现在大家都忙着逃命。但是逃命的通道很窄,大家只能排成一行。现在有n个人,从1标号到n。同时有一些奇怪的约束条件,每个都形如:a必须在b之前。 同时,社会是不平等的,这些人有的穷有的富。1号最富,2号第二富,以此类推。有钱人就贿赂负责人,所以他们有一些好处。负责人现在可以安排大家排队的顺序,由于收了好处,所以他要让1号尽量靠前,如果此时原创 2016-08-05 21:51:08 · 412 阅读 · 0 评论 -
【HDU 4324 Triangle LOVE】 + 拓扑排序
Triangle LOVE Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 4603 Accepted Submission(s): 1805Problem Description Recently, scientists fi原创 2016-10-25 23:17:44 · 386 阅读 · 0 评论 -
【POJ 3687 Labeling Balls】 + 反向拓扑
escriptionWindy 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原创 2016-10-05 23:08:19 · 354 阅读 · 0 评论 -
【Codeforces 283 C. Coin Troubles】+ 拓扑序 + 完全背包
C. Coin Troubles time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output In the Isle of Guernsey there are n different types of coins. For each i原创 2017-05-01 21:53:57 · 452 阅读 · 0 评论