上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 25 下一页

2014年3月22日

POJ --- 1724 ROADS

摘要: Time Limit:1000MSMemory Limit:65536KTotal Submissions:9928Accepted:3687DescriptionN cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the road (expressed in the number of coins) 阅读全文

posted @ 2014-03-22 10:47 ~Love() 阅读(180) 评论(0) 推荐(0)

2014年3月21日

POJ --- 2676 Sudoku

摘要: SudokuTime Limit:2000MSMemory Limit:65536KTotal Submissions:12818Accepted:6381Special JudgeDescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 to 9. The ot 阅读全文

posted @ 2014-03-21 19:02 ~Love() 阅读(189) 评论(0) 推荐(0)

POJ 3256 Cow Picnic

摘要: Cow PicnicTime Limit:2000MSMemory Limit:65536KTotal Submissions:4928Accepted:2019DescriptionThe cows are having a picnic! Each of Farmer John'sK(1 ≤K≤ 100) cows is grazing in one ofN(1 ≤N≤ 1,000) pastures, conveniently numbered 1...N. The pastures are connected byM(1 ≤M≤ 10,000) one-way paths (n 阅读全文

posted @ 2014-03-21 16:32 ~Love() 阅读(200) 评论(0) 推荐(0)

POJ -- 1088 滑雪

摘要: 滑雪Time Limit:1000MSMemory Limit:65536KTotal Submissions:71659Accepted:26468DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 813 12 11 10 9一个人可以从某个点滑向上下左右相... 阅读全文

posted @ 2014-03-21 15:13 ~Love() 阅读(132) 评论(0) 推荐(0)

POJ ---3126 Prime Path

摘要: Prime PathTime Limit:1000MSMemory Limit:65536KTotal Submissions:10370Accepted:5922DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter of security to 阅读全文

posted @ 2014-03-21 12:26 ~Love() 阅读(151) 评论(0) 推荐(0)

POJ --2570 Fiber Network

摘要: Fiber NetworkTime Limit:1000MSMemory Limit:65536KTotal Submissions:2896Accepted:1335DescriptionSeveral startup companies have decided to build a better Internet, called the "FiberNet". They have already installed many nodes that act as routers all around the world. Unfortunately, they star 阅读全文

posted @ 2014-03-21 12:23 ~Love() 阅读(179) 评论(0) 推荐(0)

POj --- 3013 Big Christmas Tree

摘要: Big Christmas TreeTime Limit:3000MSMemory Limit:131072KTotal Submissions:20034Accepted:4304DescriptionChristmas is coming to KCM city. Suby the loyal civilian in KCM city is preparing a big neat Christmas tree. The simple structure of the tree is shown in right picture.The tree can be represented as 阅读全文

posted @ 2014-03-21 12:18 ~Love() 阅读(149) 评论(0) 推荐(0)

最短路径----SPFA算法

摘要: 求最短路径的算法有许多种,除了排序外,恐怕是ACM界中解决同一类问题算法最多的了。最熟悉的无疑是Dijkstra,接着是Bellman-Ford,它们都可以求出由一个源点向其他各点的最短路径;如果我们想要求出每一对顶点之间的最短路径的话,还可以用Floyd-Warshall。SPFA是这篇日志要写的一种算法,它的性能非常好,代码实现也并不复杂。特别是当图的规模大,用邻接矩阵存不下的时候,用SPFA则可以很方便地面对临接表。每个人都写过广搜,SPFA的实现和广搜非常相似。如何求得最短路径的长度值?首先说明,SPFA是一种单源最短路径算法,所以以下所说的“某点的最短路径长度”,指的是“某点到源点的 阅读全文

posted @ 2014-03-21 09:54 ~Love() 阅读(205) 评论(0) 推荐(0)

2014年3月20日

POJ --3009

摘要: Curling 2.0Time Limit:1000MSMemory Limit:65536KTotal Submissions:10118Accepted:4264DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is marked. Th 阅读全文

posted @ 2014-03-20 19:29 ~Love() 阅读(175) 评论(0) 推荐(0)

2014年3月17日

求解n位格雷码

摘要: 1 /************************************************************************* 2 > File Name: Gray.cpp 3 > Author: wangzhili 4 > Mail: wangstdio.h@gmail.com 5 > Created Time: 2014年03月17日 星期一 21时23分04秒 6 ******************************************************... 阅读全文

posted @ 2014-03-17 21:33 ~Love() 阅读(180) 评论(0) 推荐(0)

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 25 下一页

导航