SPFA
文章平均质量分 79
zhouhongkai06
这个作者很懒,什么都没留下…
展开
-
架设电话线
题目描述 Farmer John打算将电话线引到自己的农场,但电信公司并不打算为他提供免费服务。于是,FJ必须为此向电信公司支付一定的费用。 FJ的农场周围分布着N(1 <= N <= 1,000)根按1..N顺次编号的废弃的电话线杆,任意两根电话线杆间都没有电话线相连。一共P(1<= P <= 10,000)对电话线杆间可以拉电话线,其余的那些由于隔得太远而无法被连接...原创 2018-03-13 20:02:32 · 1196 阅读 · 0 评论 -
luogu P1078 文化之旅 (NOIP 2012 普及组 第四题)
题目描述有一位使者要游历各国,他每到一个国家,都能学到一种文化,但他不愿意学习任何一种文化超过一次(即如果他学习了某种文化,则他就不能到达其他有这种文化的国家)。不同的国家可能有相同的文化。不同文化的国家对其他文化的看法不同,有些文化会排斥外来文化(即如果他学习了某种文化,则他不能到达排斥这种文化的其他国家)。现给定各个国家间的地理关系,各个国家的文化,每种文化对其他文化的看法,以及这位使者游历的...原创 2018-06-17 19:32:45 · 598 阅读 · 0 评论 -
luogu P3096 [USACO13DEC]假期计划(黄金)Vacation Planning (gold)
题目描述Air Bovinia operates flights connecting the N farms that thecows live on (1 <= N <= 20,000). As with any airline, K of these farmshave been designated as hubs (1 <= K <= 200, K <= N...原创 2018-06-17 19:42:18 · 264 阅读 · 0 评论 -
洛谷 P3115 [USACO15JAN]牛路线Cow Routing
题目描述Tired of the cold winter weather on her farm, Bessie the cow plans to fly to a warmer destination for vacation. Unfortunately, she discovers that only one airline, Air Bovinia, is willing to sell...原创 2018-06-17 22:10:21 · 451 阅读 · 0 评论 -
洛谷 P3106 [USACO14OPEN]GPS的决斗Dueling GPS's
题目描述Farmer John has recently purchased a new car online, but in his haste heaccidentally clicked the "Submit" button twice when selecting extrafeatures for the car, and as a result the car ended up eq...原创 2018-06-18 11:14:54 · 314 阅读 · 0 评论 -
洛谷 P2865 [USACO06NOV]路障Roadblocks
题目描述Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly, because she likes the scenery along the way....原创 2018-06-18 12:31:10 · 262 阅读 · 0 评论 -
洛谷 P3116 [USACO15JAN]约会时间Meeting Time
题目描述Bessie and her sister Elsie want to travel from the barn to theirfavorite field, such that they leave at exactly the same time from the barn,and also arrive at exactly the same time at their favor...原创 2018-06-18 14:59:12 · 280 阅读 · 0 评论 -
洛谷 P3063 [USACO12DEC]牛奶的路由Milk Routing
题目描述Farmer John's farm has anoutdated network of M pipes (1 <= M <= 500) for pumping milk from thebarn to his milk storage tank. He wants to remove and update most of these overthe next year, bu...原创 2018-06-18 16:25:55 · 496 阅读 · 0 评论