上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 94 下一页

2013年5月1日

HDU 4352 XHXJ's LIS(数位DP)

摘要: XHXJ's LISTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 376Accepted Submission(s): 163Problem Description#define xhxj (Xin Hang senior sister(学姐))If you do not know xhxj, then carefully reading the entire description is very important.As the 阅读全文

posted @ 2013-05-01 00:03 kuangbin 阅读(3380) 评论(0) 推荐(1) 编辑

2013年4月30日

POJ 3252 Round Numbers(数位DP)

摘要: Round NumbersTime Limit:2000MSMemory Limit:65536KTotal Submissions:6983Accepted:2384DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) i 阅读全文

posted @ 2013-04-30 22:25 kuangbin 阅读(691) 评论(0) 推荐(0) 编辑

UESTC 1307 windy数(数位DP)

摘要: 题目链接:http://acm.uestc.edu.cn/problem.php?pid=1307windy数Time Limit:1000 msMemory Limit:65536 kBSolved:104Tried:720SubmitStatusBest SolutionBackDescriptionwindy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。windy想知道,在A和B之间,包括A和B,总共有多少个windy数?Input包含两个整数,A B。满足 1 #include #include #include using namespace 阅读全文

posted @ 2013-04-30 21:52 kuangbin 阅读(674) 评论(0) 推荐(0) 编辑

HDU 2089 不要62(数位DP)

摘要: 不要62Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11833Accepted Submission(s): 3691Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。不吉利的数字为所有含有4或62的号码。例如:62315 73418 8 阅读全文

posted @ 2013-04-30 21:17 kuangbin 阅读(2038) 评论(0) 推荐(0) 编辑

HDU 3555 Bomb(数位DP)

摘要: BombTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 3362Accepted Submission(s): 1185Problem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bom 阅读全文

posted @ 2013-04-30 21:07 kuangbin 阅读(1189) 评论(0) 推荐(0) 编辑

HDU 2476 String painter (区间DP)

摘要: String painterTime Limit: 5000/2000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1117Accepted Submission(s): 443Problem DescriptionThere are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. 阅读全文

posted @ 2013-04-30 16:36 kuangbin 阅读(3564) 评论(1) 推荐(0) 编辑

ZOJ 3469 Food Delivery(区间DP)

摘要: 题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4255DP的思路就是,如果要访问完[i,j],那么它的子区间一定访问完了。用dp[i][j][0]表示访问完区间[i,j]并留在左端点,dp[i][j][1]表示访问完区间[i,j]并留在右端点。把饭店那个地方也加进去作为点。从饭店那个点往两边进行DP;dp[i][j][0] 可以根据dp[i+1][j][0]和dp[i+1][j][1]得到。dp[i][j][1] 可以根据dp[i][j-1][0]和dp[i][j-1][1]得到。//============== 阅读全文

posted @ 2013-04-30 14:59 kuangbin 阅读(1586) 评论(0) 推荐(0) 编辑

POJ 1651 Multiplication Puzzle(区间DP)

摘要: 题目链接:http://poj.org/problem?id=1651Multiplication PuzzleTime Limit:1000MSMemory Limit:65536KTotal Submissions:5000Accepted:2988DescriptionThe multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and score 阅读全文

posted @ 2013-04-30 00:42 kuangbin 阅读(1734) 评论(0) 推荐(0) 编辑

2013年4月29日

POJ 2955 Brackets (区间DP)

摘要: 题目链接:http://poj.org/problem?id=2955BracketsTime Limit:1000MSMemory Limit:65536KTotal Submissions:1977Accepted:1012DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,ifsis a regular brackets sequence, then (s) and [ 阅读全文

posted @ 2013-04-29 22:59 kuangbin 阅读(1080) 评论(0) 推荐(0) 编辑

Light OJ 1422 - Halloween Costumes

摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1422很简单的区间DP的入门题。一开始这题想了很久就是想不出来。直到做了后面几道区间DP回过来终于想明白了。区间DP可以使用记忆化搜索和直接DP的方法写。这题的状态转移方程:dp[i][j]=min(1+dp[i+1][j],dp[i+1][k-1]+dp[k][j]) ( a[i]==a[k] i<k<=j )注意初始化。/* * Light OJ 1422 - Halloween Costumes * http://lightoj.com/volume_showpro 阅读全文

posted @ 2013-04-29 22:52 kuangbin 阅读(1592) 评论(0) 推荐(0) 编辑

上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 94 下一页

导航

JAVASCRIPT: