码迷,mamicode.com
首页 >  
搜索关键字:简单dp    ( 346个结果
ZOJ 2366 Weird Dissimilarity (简单DP)
题意: 字符c1和c2的距离为d(c1, c2),已知两个字符串s和t,现在要找长度相等的两个字符串a和b,使得s是a的子序列,t是b的子序列,且a和b的距离最小。 思路: 字串和子序列是不一样的。。。。子序列是允许中间 间断 的,而字串必须是连续的...比赛的时候居然理解错了....T_T 这样的话,用最长公共子序列的思路来解决这道题就好啦~ dp[i][j]表示 “第一个串处理到...
分类:其他好文   时间:2015-07-13 14:04:28    阅读次数:120
HDU5280 Senior's Array(简单DP)
HDU5280 Senior's Array(简单DP)...
分类:其他好文   时间:2015-07-12 11:11:16    阅读次数:91
poj 2193 Lenny's Lucky Lotto Lists 简单dp
//poj 2193 //sep9 #include using namespace std; typedef __int64 INT; INT dp[16][2048]; int n,m; int main() { int cases,t=0; scanf("%d",&cases); while(cases--){ scanf("%d%d",&n,&m); memset(dp,0...
分类:其他好文   时间:2015-07-03 01:41:59    阅读次数:198
poj1163The Triangle(简单DP)
转载请注明出处:viewmode=contents">http://blog.csdn.net/u012860063?viewmode=contents题目链接:http://poj.org/problem?id=1163---------------------------------------...
分类:其他好文   时间:2015-06-08 13:22:28    阅读次数:110
srm 533
250 Description 给你一串数字序列,每次删掉第ii个数,获得权值w[i?1]×w[i+1]w[i-1]\times w[i+1],求最后剩下第一个和最后一个数获得的最大权值和 Solution 简单dp,枚举断点即可 Code#include using namespace std; const int N = 55; typedef long...
分类:其他好文   时间:2015-06-05 19:46:53    阅读次数:101
leetcode_70题——Climbing Stairs(简单DP题)
Climbing StairsTotal Accepted:54579Total Submissions:158996My SubmissionsQuestionSolutionYou are climbing a stair case. It takesnsteps to reach to the...
分类:其他好文   时间:2015-06-05 10:08:35    阅读次数:105
POI2013 Bytecomputer
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=3427可以证明最终序列为-1...0....1因为首先如果 a(i-1) 为-1或0,执行操作不会让答案变优。然后,如果可以加到大于1的某个数字,一定可以加到1,显然加到1更佳。然后简单dp,f[...
分类:其他好文   时间:2015-06-04 08:35:42    阅读次数:135
POJ 3250 Bad Hair Day 简单DP 好题
DescriptionSome of Farmer John'sNcows (1 ≤N≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants t...
分类:其他好文   时间:2015-05-30 00:29:43    阅读次数:321
UVA1025---A Spy in the Metro(简单dp)
dp[i][j]dp[i][j]表示时刻i,在车站j,等待的最少时间 有3中方案: 等一分钟 往左搭车 往右搭车/************************************************************************* > File Name: uva1025.cpp > Author: ALex > Mail: zchao1...
分类:其他好文   时间:2015-05-25 22:34:21    阅读次数:237
hdu 5092 Seam Carving 简单DP ”水一炮试试“大法
2014上海邀请赛 卡读题 教训是要培养一种”水一炮试试“的意识 实质是简单DP
分类:其他好文   时间:2015-05-20 20:06:05    阅读次数:117
346条   上一页 1 ... 20 21 22 23 24 ... 35 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!