• 等级
  • 7299 访问
  • 54 原创
  • 6 转发
  • 113367 排名
  • 3 评论
  • 4 获赞

floyd(poj2240 arbitrage)

ArbitrageTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 26618 Accepted: 11223DescriptionArbitrageistheuseofdiscrepanciesincurrencyexchangeratestotransformoneunitofacurrency...

2018-05-17 16:37:35

floyd最短路径算法(poj3660 cow contest)

1、最短路径问题介绍问题解释: 从图中的某个顶点出发到达另外一个顶点的所经过的边的权重和最小的一条路径,称为最短路径解决问题的算法:迪杰斯特拉算法(Dijkstra算法)弗洛伊德算法(Floyd算法)SPFA算法之前已经对Dijkstra算法做了介绍(不懂的可以看这篇博客:Dijkstra算法详解),所以这篇博客打算对Floyd算法做详细的的介绍。2、Floyd算法的介绍算法的特点: 弗洛伊德算法...

2018-05-17 15:42:51

dijkstra(poj1502 MPI Maelstrom )

MPIMaelstromTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 11305 Accepted: 6966DescriptionBIThasrecentlytakendeliveryoftheirnewsupercomputer,a32processorApolloOdysseydistribu...

2018-05-16 21:05:45

bellmanford(poj3259 wormholes)

WormholesTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 59980 Accepted: 22417DescriptionWhileexploringhismanyfarms,FarmerJohnhasdiscoveredanumberofamazingwormholes.Awormhole...

2018-05-16 19:56:30

最短路径算法—Bellman-Ford(poj1860 currency exchange)

Bellman-Ford算法详讲Dijkstra算法是处理单源最短路径的有效算法,但它局限于边的权值非负的情况,若图中出现权值为负的边,Dijkstra算法就会失效,求出的最短路径就可能是错的。这时候,就需要使用其他的算法来求解最短路径,Bellman-Ford算法就是其中最常用的一个。该算法由美国数学家理查德•贝尔曼(Richard Bellman, 动态规划的提出者)和小莱斯特•福特(Lest...

2018-05-15 19:23:55

dijkstra(poj3268)

Language:DefaultSilverCowPartyTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 27003 Accepted: 12341DescriptionOnecowfromeachof N farms(1≤ N ≤1000)convenientlynumbered1..N isgoin...

2018-05-15 17:58:29

最短路径—dijkstra算法(poj2387)

TiltheCowsComeHomeTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 68201 Accepted: 22898DescriptionBessieisoutinthefieldandwantstogetbacktothebarntogetasmuchsleepaspos...

2018-05-11 17:51:33

dfs(poj1321 棋盘问题)

棋盘问题TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 60858 Accepted: 29154Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输...

2018-05-10 20:42:35

dfs(poj2488 a knight’s journey)

AKnight'sJourneyTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 49869 Accepted: 16929DescriptionBackground Theknightisgettingboredofseeingthesameblackandwhitesquaresagainand...

2018-05-10 19:32:17

模拟+bfs(poj3083 children of the candy corn)

ChildrenoftheCandyCornTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 14932 Accepted: 6435DescriptionThecornfieldmazeisapopularHalloweentreat.Visitorsareshowntheentranceand...

2018-05-10 18:27:20

bfs迷宫(poj2251dungeon master)

DungeonMasterTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 44624 Accepted: 16801DescriptionYouaretrappedina3Ddungeonandneedtofindthequickestwayout!Thedungeoniscomposedo...

2018-05-08 20:23:28

bfs(poj1426 find the multiple)

FindTheMultipleTimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 39336 Accepted: 16437 SpecialJudgeDescriptionGivenapositiveintegern,writeaprogramtofindoutanonzeromultiplemof...

2018-05-08 19:14:08

bfs+素数打表(poj3126 prime path)

PrimePathTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 25795 Accepted: 14207DescriptionTheministersofthecabinetwerequiteupsetbythemessagefromtheChiefofSecuritystatingthat...

2018-05-08 18:22:02

bfs+模拟(poj3414 pots倒水问题)

PotsTimeLimit: 1000MS MemoryLimit: 65536KTotalSubmissions: 21047 Accepted: 8976 SpecialJudgeDescriptionYouaregiventwopots,havingthevolumeof A and B litersrespectively.Thefollowingopera...

2018-05-08 17:12:06

dfs+队列(poj3278 catch the cow)

CatchThatCowTimeLimit: 2000MS MemoryLimit: 65536KTotalSubmissions: 111204 Accepted: 34771DescriptionFarmerJohnhasbeeninformedofthelocationofafugitivecowandwantstocatchherimmediat...

2018-05-07 18:56:23

动态规划+递归(poj1664 放苹果)

放苹果TimeLimit: 1000MS MemoryLimit: 10000KTotalSubmissions: 36485 Accepted: 22473Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1是同一种分法。Input第一行是测试数据的数目t(0<=t<=20)。以下...

2018-05-07 18:19:18

hdu1172猜数字

猜数字TimeLimit:20000/10000MS(Java/Others)    MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):6854    AcceptedSubmission(s):3769ProblemDescription猜数字游戏是gameboy最喜欢的游戏之一。游戏的规则是这样的:计算机随...

2018-05-06 20:43:02

dfs(hdu1175 连连看)

连连看TimeLimit:20000/10000MS(Java/Others)    MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):40217    AcceptedSubmission(s):9926ProblemDescription“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规...

2018-05-06 17:32:22

空间点到直线的距离(hdu1174 爆头)

爆头TimeLimit:2000/1000MS(Java/Others)    MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):2827    AcceptedSubmission(s):1344ProblemDescriptiongameboy是一个CS高手,他最喜欢的就是扮演警察,手持M4爆土匪的头。也许...

2018-05-06 16:13:04

经典bfs(poj1915)

KnightMovesTimeLimit: 1000MS MemoryLimit: 30000KTotalSubmissions: 28445 Accepted: 13373DescriptionBackground MrSomurolov,fabulouschess-gamerindeed,assertsthatnooneelsebuthimcanmovekn...

2018-05-06 16:10:50

luojiushenzi

关注