最短路
invoKer-
这个作者很懒,什么都没留下…
展开
-
CodeForces - 29E Quarrel【最短路】
题目链接:https://codeforces.com/contest/29/problem/E#include <iostream>#include <cstdio>#include <cstdlib>#include <cctype>#include <cmath>#include <climits>#include <cstring>#include <vector>#include &l原创 2021-02-15 18:24:10 · 178 阅读 · 0 评论 -
CodeForces - 25C Roads in Berland【Floyd】
题目链接:https://codeforces.com/contest/25/problem/C#include <iostream>using namespace std;static const int MAXN=300+10;int f[MAXN][MAXN];int n,m,u,v,w;int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) for(int j=1;j<=n;j+原创 2020-11-06 14:16:53 · 122 阅读 · 0 评论 -
CodeForces - 20C Dijkstra?【最短路】
题目链接:https://codeforces.com/contest/20/problem/Cdijkstra板子题#include <iostream>#include <vector>#include <cstring>#include <queue>using namespace std;static const int MAXN=1e5+10;struct Node { int v, w; bool operator&原创 2020-10-25 22:35:17 · 304 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Candies POJ - 3159【dijkstra】
【题目描述】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 flymouse distribute them. ...原创 2019-09-01 00:34:40 · 139 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Subway POJ - 2502【dijkstra】
【题目描述】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. Because you don’...原创 2019-09-02 00:56:09 · 233 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 昂贵的聘礼 POJ - 1062【dijkstra】
【题目描述】年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。“探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄...原创 2019-09-02 15:34:33 · 83 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Tram POJ - 1847【dijkstra】
【题目描述】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 out of the interse...原创 2019-09-02 16:05:03 · 236 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Extended Traffic LightOJ - 1074【spfa】
【题目描述】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 the crowded roads, to reach d...原创 2019-09-02 21:15:55 · 156 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 The Shortest Path in Nya Graph HDU - 4725【dijkstra】
【题目描述】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 do not understand a word of this paragraph...原创 2019-09-03 00:17:34 · 156 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Invitation Cards POJ - 1511【dijkstra】
【题目描述】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, most of all, Antique Comedies...原创 2019-08-31 20:29:53 · 168 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Arbitrage POJ - 2240【spfa】
【题目描述】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 1 US Dollar buys 0.5...原创 2019-08-31 15:46:12 · 165 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Til the Cows Come Home POJ - 2387【dijkstra/bellman_ford/spfa】
【题目描述】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 needs her beauty sleep, so she wants t...原创 2019-08-28 15:04:15 · 163 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Frogger POJ - 2253【dijkstra/floyd】
【题目描述】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 and full of touris...原创 2019-08-28 15:42:50 · 250 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Heavy Transportation POJ - 1797【dijkstra】
【题目描述】BackgroundHugo 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 really is a way from the place h...原创 2019-08-28 17:02:14 · 234 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Silver Cow Party POJ - 3268【dijkstra】
【题目描述】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 ≤ 100,000) unidirectional (one-...原创 2019-08-28 20:11:24 · 139 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Currency Exchange POJ - 1860【spfa】
【题目描述】Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. Th...原创 2019-08-30 14:54:44 · 148 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Wormholes POJ - 3259【spfa】
【题目描述】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 destination at a time...原创 2019-08-30 15:40:17 · 124 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 MPI Maelstrom POJ - 1502【dijkstra】
【题目描述】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 destination at a time...原创 2019-08-30 16:42:46 · 154 阅读 · 0 评论 -
[kuangbin]专题四 最短路练习 Cow Contest POJ - 3660【传递闭包】
【题目描述】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 constant skill rating that...原创 2019-08-30 21:00:28 · 120 阅读 · 0 评论 -
CCF-CSP 201903-5 317号子任务【Floyd】(30分)
试题编号: 201903-5试题名称: 317号子任务时间限制: 1.0s内存限制: 512.0MB题目描述:只会Floyd拿前30分,能拿60分的算法不会写,能拿100分的算法至今还没听说代码如下(30分):#include <iostream>#include <cstring>#include <algorithm>using n...原创 2019-08-16 00:06:13 · 1280 阅读 · 1 评论