图论
darge.
.
展开
-
最短路SPFA—0 or 1(HDU - 4370)
题目链接:>_> 题目:0 or 1 Given a nn matrix C ij (1<=i,j<=n),We want to find a nn matrix X ij (1<=i,j<=n),which is 0 or 1. Besides,X ij meets the following conditions: 1.X 12+X 13+…X 1n=1 2...原创 2020-01-17 13:37:50 · 156 阅读 · 0 评论 -
最短路dijkstra—The Shortest Path in Nya Graph(HDU - 4725)
题目链接:>_> 题目:The Shortest Path in Nya Graph This is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algoritmo. If you ...原创 2020-01-16 18:33:18 · 174 阅读 · 0 评论 -
最短路SPFA—Extended Traffic(LightOJ - 1074)
题目链接:>_> 题目:Extended Traffic Dhaka city is getting crowded and noisy day by day. Certain roads always remain blocked in congestion. In order to convince people avoid shortest routes, and hence t...原创 2020-01-15 19:38:03 · 167 阅读 · 0 评论 -
最短路dijktra—Tram(POJ-1847)
题目链接:>_> 题目:Tram Tram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going ou...原创 2020-01-15 19:35:08 · 127 阅读 · 0 评论 -
最短路dijkstra—昂贵的聘礼(POJ-1062)
题目链接:>_> 题目:昂贵的聘礼 年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。“探险家就跑到大祭司那里,向他要求皮袄或水晶球...原创 2020-01-15 19:32:39 · 416 阅读 · 0 评论 -
最短路dijkstra—Subway(POJ-2502)
题目链接:>_> 题目:Subway You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get to walk and take the subway...原创 2020-01-15 19:26:34 · 266 阅读 · 0 评论 -
最短路SPFA—Candies(POJ - 3159)
题目链接:>_> 题目:Candies During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymous...原创 2020-01-15 19:24:21 · 160 阅读 · 0 评论 -
最短路dijkstra—Invitation Cards(POJ-1511)
题目链接:>_> 题目:Invitation Cards In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, m...原创 2020-01-15 19:22:04 · 152 阅读 · 0 评论 -
最短路SPFA—Arbitrage(POJ-2240)
题目链接:>_> 题目:Arbitrage Arbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that...原创 2020-01-15 19:18:48 · 129 阅读 · 0 评论 -
最短路floyde—Cow Contest(POJ - 3660)
题目链接:>_> 题目:Cow Contest N (1 ≤ N ≤ 100) cows, conveniently numbered 1…N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain con...原创 2020-01-15 19:15:02 · 100 阅读 · 0 评论 -
最短路dijkstra—MPI Maelstrom(POJ - 1502)
题目链接:>_> 题目:MPI Maelstrom BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem....原创 2020-01-14 16:06:21 · 137 阅读 · 0 评论 -
最短路SPFA—Wormholes(POJ - 3259)
题目链接:>_> 题目:Wormholes While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its ...原创 2020-01-14 16:01:44 · 108 阅读 · 0 评论 -
最短路dijikstra—Silver Cow Party(POJ - 3268)
题目链接:>_> 题目:Silver Cow Party One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1…N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 1...原创 2020-01-14 15:54:54 · 90 阅读 · 0 评论 -
最短路dijkstra—Heavy Transportation(poj 1797)
题目链接:>_> 题目:Heavy Transportation Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there ...原创 2020-01-13 15:27:55 · 102 阅读 · 0 评论 -
最短路floyde—Frogger(poj2253)
题目链接:>_> 题目:Frogger Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty...原创 2020-01-13 14:03:07 · 127 阅读 · 0 评论 -
HDU-3986 最短路(SPFA+记录路径)
题目链接:>_> 题目:Harry Potter and the Final Battle The final battle is coming. Now Harry Potter is located at city 1, and Voldemort is located at city n. To make the world peace as soon as possible, ...原创 2019-09-26 20:28:40 · 172 阅读 · 0 评论 -
spfa+链式前向星(模板)
解决问题 单源最短路,负环图 代码模板 #include<bits/stdc++.h> using namespace std; const long long inf = 0x3f3f3f3f; const int maxn = 10005; const int maxm = 500005; int n, m, s, cnt = 0; int dis[maxn], vis[maxn]...原创 2019-09-17 19:13:27 · 100 阅读 · 0 评论 -
POJ 2387 dijkstra+链式前向星+优先队列优化(模板)
题目链接:>_> 题目: Til the Cows Come Home Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie nee...原创 2019-09-16 19:58:35 · 173 阅读 · 0 评论 -
HDU 1245 最短路(floyd)
题目链接:>_> Saving James Bond This time let us consider the situation in the movie “Live and Let Die” in which James Bond, the world’s most famous spy, was captured by a group of drug dealers. He w...原创 2019-09-11 21:21:41 · 163 阅读 · 0 评论