随笔分类 -  最短路

摘要:众所周知,蒜蒜是一名热爱工作的好员工,他觉得时间就是金钱,做事情总是争分夺秒。 这天晚上,蒜蒜一个人去吃晚饭。不巧的是,吃完饭以后就开始下雨了,蒜蒜并没有带雨伞出来。但是蒜蒜热爱工作,工作使他快乐,他要尽快赶回去写代码。 蒜蒜的公司在中关村,中关村这边地形复杂,有很多天桥、地下通道和马路交错在一起。 阅读全文
posted @ 2017-10-24 22:53 Billyshuai 阅读(378) 评论(0) 推荐(0)
摘要:题意:给你M,N,K,代表你有M点法力值,N个物品,K个制造方式 接下来N行,如果以1开头则代表既能卖又能合成,0代表只能卖。 然后K行,每行第一个数是要合成的东西,第二个数代表有几对,每对第一个数是那种物品,第二个是需要几个。 注意不能直接合成的可以通过制造方式来合成。然后问你花费完所有的法力制造 阅读全文
posted @ 2017-10-15 21:31 Billyshuai 阅读(403) 评论(0) 推荐(0)
摘要:题意:给你点和边,让你找最小环的权值,其权值是所有边权的和,没环输出-1。 解法:枚举每一条边,找到其端点,做最短路。、 阅读全文
posted @ 2017-10-15 16:35 Billyshuai 阅读(233) 评论(0) 推荐(0)
摘要:After going through the receipts from your car trip through Europe this summer, you realised that the gas prices varied between the cities you visited 阅读全文
posted @ 2017-07-26 19:49 Billyshuai 阅读(225) 评论(0) 推荐(0)
摘要:Farmer John has decided to reward his cows for their hard work by taking them on a tour of the big city! The cows must decide how best to spend their 阅读全文
posted @ 2017-07-26 17:33 Billyshuai 阅读(184) 评论(0) 推荐(0)
摘要:For their physical fitness program, N (2 ≤ N ≤ 1,000,000) cows have decided to run a relay race using the T (2 ≤ T ≤ 100) cow trails throughout the pa 阅读全文
posted @ 2017-07-26 16:29 Billyshuai 阅读(170) 评论(0) 推荐(0)
摘要:Description Tour operator Your Personal Holiday organises guided bus trips across the Benelux. Every day the bus moves from one city S to another city 阅读全文
posted @ 2017-07-26 11:23 Billyshuai 阅读(281) 评论(0) 推荐(0)
摘要:Remmarguts' Date Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 30017 Accepted: 8159 Description "Good man never makes girls wait or break 阅读全文
posted @ 2017-07-25 10:50 Billyshuai 阅读(229) 评论(0) 推荐(0)