随笔分类 -  图论:拓扑排序

摘要:D. Gourmet choice 链接:http://codeforces.com/contest/1131/problem/D 思路: = 的情况我们用并查集把他们扔到一个集合,然后根据 > < 跑拓扑排序,根据拓扑排序的结果从小到大填数字就好了,需要注意的细节写在代码注释里了 代码: F. A 阅读全文
posted @ 2019-02-24 20:31 冥想选手 阅读(409) 评论(0) 推荐(0)
摘要:Toposort Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 499 Accepted Submission(s): 203 Probl 阅读全文
posted @ 2018-04-14 21:13 冥想选手 阅读(163) 评论(0) 推荐(0)
摘要:DZY Loves Topological Sorting Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1250 Accepted Sub 阅读全文
posted @ 2018-04-14 19:51 冥想选手 阅读(148) 评论(0) 推荐(0)
摘要:John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been e 阅读全文
posted @ 2018-03-07 22:02 冥想选手 阅读(164) 评论(0) 推荐(0)