• 等级
  • 3279 访问
  • 54 原创
  • 6 转发
  • 108141 排名
  • 3 评论
  • 1 获赞

floyd(poj2240 arbitrage)

ArbitrageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 26618 Accepted: 11223DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency ...

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 )

MPI MaelstromTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11305 Accepted: 6966DescriptionBIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distribu...

2018-05-16 21:05:45

bellmanford(poj3259 wormholes)

WormholesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 59980 Accepted: 22417DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole ...

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:DefaultSilver Cow PartyTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 27003 Accepted: 12341DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is goin...

2018-05-15 17:58:29

最短路径—dijkstra算法(poj2387)

Til the Cows Come HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 68201 Accepted: 22898DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as pos...

2018-05-11 17:51:33

dfs(poj1321 棋盘问题)

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

2018-05-10 20:42:35

dfs(poj2488 a knight’s journey)

A Knight's JourneyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 49869 Accepted: 16929DescriptionBackground The knight is getting bored of seeing the same black and white squares again and ...

2018-05-10 19:32:17

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

Children of the Candy CornTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14932 Accepted: 6435DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and ...

2018-05-10 18:27:20

bfs迷宫(poj2251dungeon master)

Dungeon MasterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 44624 Accepted: 16801DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed o...

2018-05-08 20:23:28

bfs(poj1426 find the multiple)

Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 39336 Accepted: 16437 Special JudgeDescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of...

2018-05-08 19:14:08

bfs+素数打表(poj3126 prime path)

Prime PathTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 25795 Accepted: 14207DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that...

2018-05-08 18:22:02

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

PotsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 21047 Accepted: 8976 Special JudgeDescriptionYou are given two pots, having the volume of A and B liters respectively. The following opera...

2018-05-08 17:12:06

dfs+队列(poj3278 catch the cow)

Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 111204 Accepted: 34771DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediat...

2018-05-07 18:56:23

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

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

2018-05-07 18:19:18

hdu1172猜数字

猜数字Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6854    Accepted Submission(s): 3769Problem Description猜数字游戏是gameboy最喜欢的游戏之一。游戏的规则是这样的:计算机随...

2018-05-06 20:43:02

dfs(hdu1175 连连看)

连连看Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 40217    Accepted Submission(s): 9926Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规...

2018-05-06 17:32:22

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

爆头Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2827    Accepted Submission(s): 1344Problem Descriptiongameboy是一个CS高手,他最喜欢的就是扮演警察,手持M4爆土匪的头。也许...

2018-05-06 16:13:04

经典bfs(poj1915)

Knight MovesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 28445 Accepted: 13373DescriptionBackground Mr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move kn...

2018-05-06 16:10:50

luojiushenzi

关注