随笔分类 - 图论---最短(长)路径
摘要:Luogu 1979 NOIP 2013 华容道(搜索,最短路径) Description 小 B 最近迷上了华容道,可是他总是要花很长的时间才能完成一次。于是,他想到用编程来完成华容道:给定一种局面, 华容道是否根本就无法完成,如果能完成, 最少需要多少时间。 小 B 玩的华容道与经典的华容道游戏
阅读全文
摘要:HDU 1069 Monkey and Banana / ZOJ 1093 Monkey and Banana (最长路径) Description A group of researchers are designing an experiment to test the IQ of a monk
阅读全文
摘要:HDU 3416 Marriage Match IV (最短路径,网络流,最大流) Description Do not sincere non interference。 Like that show, now starvae also take part in a show, but it ta
阅读全文
摘要:Libre 6009 「网络流 24 题」软件补丁 / Luogu 2761 软件安装问题 (最短路径,位运算) Description T 公司发现其研制的一个软件中有 n 个错误,随即为该软件发放了一批共 m 个补丁程序。每一个补丁程序都有其特定的适用环境,某个补丁只有在软件中包含某些错误而同时
阅读全文
摘要:Libre 6008 「网络流 24 题」餐巾计划 (网络流,最小费用最大流) Description 一个餐厅在相继的N天里,第i天需要Ri块餐巾(i=l,2,…,N)。餐厅可以从三种途径获得餐巾。 (1)购买新的餐巾,每块需p分; (2)把用过的餐巾送到快洗部,洗一块需m天,费用需f分(f<p)
阅读全文
摘要:POJ 1847 Tram (最短路径) Description Tram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection
阅读全文
摘要:POJ 1062 昂贵的聘礼(图论,最短路径) Description 年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,
阅读全文
摘要:POJ 2502 Subway / NBUT 1440 Subway / SCU 2186 Subway(图论,最短距离) Description You have just moved from a quiet Waterloo neighbourhood to a big, noisy city
阅读全文
摘要:POJ 3159 Candies (图论,差分约束系统,最短路) Description During the kindergarten days, flymouse was the monitor of his class. Occasionally the head teacher brough
阅读全文
摘要:POJ 1511 Invitation Cards / UVA 721 Invitation Cards / SPOJ Invitation / UVAlive Invitation Cards / SCU 1132 Invitation Cards / ZOJ 2008 Invitation Ca
阅读全文
摘要:POJ 2240 Arbitrage / ZOJ 1092 Arbitrage / HDU 1217 Arbitrage / SPOJ Arbitrage(图论,环) Description Arbitrage is the use of discrepancies in currency exch
阅读全文
摘要:POJ 1502 MPI Maelstrom / UVA 432 MPI Maelstrom / SCU 1068 MPI Maelstrom / UVALive 5398 MPI Maelstrom /ZOJ 1291 MPI Maelstrom (最短路径) Description BIT ha
阅读全文
摘要:POJ 3259 Wormholes(最短路径,求负环) Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very
阅读全文
摘要:POJ 1860 Currency Exchange / ZOJ 1544 Currency Exchange (最短路径相关,spfa求环) Description Several currency exchange points are working in our city. Let us s
阅读全文
摘要:POJ 3268 Silver Cow Party (最短路径) Description One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow par
阅读全文
摘要:POJ 1797 Heavy Transportation / SCU 1819 Heavy Transportation (图论,最短路径) Description Background Hugo Heavy is happy. After the breakdown of the Cargoli
阅读全文
摘要:POJ 2235 Frogger / UVA 534 Frogger /ZOJ 1942 Frogger(图论,最短路径) Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notic
阅读全文
摘要:POJ 2251 Dungeon Master /UVA 532 Dungeon Master / ZOJ 1940 Dungeon Master(广度优先搜索) Description You are trapped in a 3D dungeon and need to find the qui
阅读全文
摘要:POJ 2387 Til the Cows Come Home (图论,最短路径) Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible be
阅读全文
摘要:Luogu 1613 跑路(最短路径,倍增) Description 小A的工作不仅繁琐,更有苛刻的规定,要求小A每天早上在6:00之前到达公司,否则这个月工资清零。可是小A偏偏又有赖床的坏毛病。于是为了保住自己的工资,小A买了一个十分牛B的空间跑路器,每秒钟可以跑2^k千米(k是任意自然数)。当然
阅读全文