随笔分类 -  图论 最短路

摘要:You are playing a game with your elder brother.First, a number of circles and arrows connecting some pairs of the circles are drawn on the ground.Two 阅读全文
posted @ 2016-08-31 14:59 快点说我帅 阅读(524) 评论(0) 推荐(0)
摘要:F - Trucking Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status F - Trucking Submit Status Description A certain local truck 阅读全文
posted @ 2016-07-22 21:14 快点说我帅 阅读(262) 评论(0) 推荐(0)
摘要:C. Recycling Bottles time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It was recycling da 阅读全文
posted @ 2016-05-25 16:57 快点说我帅 阅读(283) 评论(0) 推荐(0)
摘要:E. Breaking Good time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Breaking Good is a new 阅读全文
posted @ 2016-05-07 20:42 快点说我帅 阅读(132) 评论(0) 推荐(0)
摘要:E. Paths and Trees time limit per test 3 seconds time limit per test memory limit per test 256 megabytes memory limit per test input standard input in 阅读全文
posted @ 2016-05-02 23:44 快点说我帅 阅读(166) 评论(0) 推荐(0)
摘要:题目:有n个城镇,m条边权为1的双向边让你破坏最多的道路,使得从s1到t1,从s2到t2的距离分别不超过d1和d2。 分析: 1.反过来思考,转换为求s1到t1和s2到t2的最短路。 2.假如上述两条最短路没有公共边,那么显然能删除的边就是除这两条路以外的所有的边; 但是假如有重合的边呢?那么我们只 阅读全文
posted @ 2016-05-02 10:01 快点说我帅 阅读(231) 评论(0) 推荐(0)
摘要:题意:牛之间有绝对的强弱,给出一些胜负关系,问有多少头牛可以确定其绝对排名。 分析: 1.一头牛的排名能确定的话,那么肯定他跟其余的n-1头牛的胜负关系都已经(直接或间接)确定好了,因此,只需判断这头牛是否与其他牛的胜负关系确定了没有。 2.A输给了B,B输给了C,那么A肯定会输给C,要确定任意两头 阅读全文
posted @ 2016-05-01 19:34 快点说我帅 阅读(220) 评论(0) 推荐(0)