码迷,mamicode.com
首页 >  
搜索关键字:poj 3348 cows    ( 21218个结果
poj 1002:487-3279(水题,提高题 / hash)
487-3279Time Limit:2000MSMemory Limit:65536KTotal Submissions:236746Accepted:41288DescriptionBusinesses like to have memorable telephone numbers. One ...
分类:其他好文   时间:2014-06-04 21:08:17    阅读次数:349
poj 3270 Cow Sorting
http://poj.org/problem?id=3270这道题就是给你一个无序序列转换成有序序列需要花费的代价最小,交换a和b代价为a+b; 1 #include 2 #include 3 #include 4 #define maxn 20000 5 using namespace st...
分类:其他好文   时间:2014-06-03 13:14:32    阅读次数:272
poj 1011 Sticks
DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to ...
分类:其他好文   时间:2014-05-30 23:00:32    阅读次数:395
POJ 3680 Intervals 离散 + 费用流
IntervalsTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 6246Accepted: 2542DescriptionYou are given N weighted open intervals. The ith interv...
分类:其他好文   时间:2014-05-30 21:46:55    阅读次数:399
poj 1026 Cipher
http://poj.org/problem?id=1026这道题题意是给你一个置换群,再给你一个字符串,输出经过k次置换的字符串。 就是找循环节。 1 #include 2 #include 3 #include 4 #define maxn 3000 5 using namespace s...
分类:其他好文   时间:2014-05-30 21:45:37    阅读次数:249
poj 1573
题意:给定每一步的定方向与初始位置 让求出去房间 或者进入循环的步数直接模拟#include#includeusing namespace std;int map[11][11];int v[11][11];int dir[4][2]={-1,0,1,0,0,-1,0,1};int main(){ ...
分类:其他好文   时间:2014-05-30 09:03:03    阅读次数:247
POJ 3411 Paid Roads(SPFA || DFS)
题目链接题意 : 要从1城市到n城市,求最短路是多少,从a城市到达b城市的路程,如果你到过c城市,则需要走p,否则走r长。思路 : 因为可以来回走,所以不能用单纯的最短路,可以用二维SPFA,状态压缩一下,第二维来记录状态,表示到过这个点的第几个状态。也可以用DFS,因为最多十个点,所以如果走某一个...
分类:其他好文   时间:2014-05-30 04:08:41    阅读次数:279
poj 1004:Financial Management(水题,求平均数)
Financial ManagementTime Limit:1000MSMemory Limit:10000KTotal Submissions:126087Accepted:55836DescriptionLarry graduated this year and finally has a j...
分类:其他好文   时间:2014-05-30 02:10:56    阅读次数:222
POJ 1724 ROADS(BFS+优先队列)
题目链接题意 : 求从1城市到n城市的最短路。但是每条路有两个属性,一个是路长,一个是花费。要求在花费为K内,找到最短路。思路 :这个题好像有很多种做法,我用了BFS+优先队列。崔老师真是千年不变的SPFA啊,链接。还有一个神用了好几种方法分析,链接。用优先队列控制长度,保证每次加的都是最短的,每次...
分类:其他好文   时间:2014-05-30 01:54:32    阅读次数:213
poj 2049 -- Finding Nemo
Finding NemoTime Limit: 2000MSMemory Limit: 30000KTotal Submissions: 7372Accepted: 1714DescriptionNemo is a naughty boy. One day he went into the deep...
分类:其他好文   时间:2014-05-29 09:36:17    阅读次数:355
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!