码迷,mamicode.com
首页 >  
搜索关键字:lost cows    ( 2004个结果
poj1947--Rebuilding Roads(树状dp)
Rebuilding Roads Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 9496   Accepted: 4316 Description The cows have reconstructed Farmer John's farm, with its N b...
分类:其他好文   时间:2015-03-06 20:46:41    阅读次数:222
POJ 2385 Apple Catching
比起之前一直在刷的背包题,这道题可以算是最纯粹的dp了,写下简单题解。 题意是说cows在1树和2树下来回移动取苹果,有移动次数限制,问最后能拿到的最多苹果数,含有最优子结构性质,大致的状态转移也不难想出,以 dp[i][j] 表示第 i 分钟使用了 j 次移动机会时能获得的最多苹果数(不需3...
分类:移动开发   时间:2015-03-05 19:25:41    阅读次数:148
USACO1.2--Milking Cows
将输入的时间按起点排序后就可以直接模拟了,注意区间嵌套的情况,开始的时候没考虑,导致WA了好几次。代码如下:/* ID: 15674811 LANG: C++ TASK: milk2 */#include #include #include #include #include using namespace...
分类:其他好文   时间:2015-03-05 17:08:37    阅读次数:125
POJ 3348 Cows(凸包+多边形面积)
先求出凸包,然后利用凸包求出面积,除以50就是答案 代码: #include #include #include using namespace std; const int MAXN=10005; struct Point { double x, y; Point() {} Point(double x, double y) { this->x =...
分类:其他好文   时间:2015-03-05 14:55:29    阅读次数:127
poj-3816 Treats for the Cows 【区间DP】
Treats for the Cows Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4259   Accepted: 2150 Description FJ has purchased N (1 The treats are interesting ...
分类:其他好文   时间:2015-03-04 22:52:04    阅读次数:342
Triangular Pastures
DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; new geometr...
分类:其他好文   时间:2015-03-04 16:29:08    阅读次数:125
Y2K Accounting Bug
DescriptionAccounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc.All...
分类:其他好文   时间:2015-03-04 14:30:26    阅读次数:126
poj Popular Cows(tarjan +缩点)
Language: Default Popular Cows Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 24384   Accepted: 10007 Description Every cow's dream is to become the mos...
分类:其他好文   时间:2015-03-03 09:57:41    阅读次数:142
poj 2182 Lost Cows
Lost CowsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 9536Accepted: 6146DescriptionN (2 2 #include 3 #include 4 #include 5 #include 6 #in....
分类:其他好文   时间:2015-03-02 00:57:51    阅读次数:211
寒假D3 A Find the Lost Sock
Alice bought a lot of pairs of socks yesterday. But when she went home, she found that she has lost one of them. Each sock has a name which contains e...
分类:其他好文   时间:2015-03-01 22:21:59    阅读次数:286
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!