动态规划
文章平均质量分 77
栗悟饭和龟仙人
这个作者很懒,什么都没留下…
展开
-
CodeForces 478D-Red-Green Towers
题目D. Red-Green Towerstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are r red and g green block原创 2016-07-11 18:12:13 · 1089 阅读 · 0 评论 -
CodeForces 213C-Relay Race
题目C. Relay Racetime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFurik and Rubik take part in a relay race原创 2016-07-11 18:21:27 · 578 阅读 · 0 评论 -
CodeForces 427D-Match & Catch
题目D. Match & Catchtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputPolice headquarter is monitoring signal原创 2016-07-12 09:48:14 · 816 阅读 · 0 评论 -
hdu 5707 Combine String
题意给出a,b,c三个字符串,如果能把c拆成两个子序列,而且a,b分别等于这两个子序列,就输出Yes,否则输出No。解法动态规划,dp[i][j]为1表示a的前i个和b的前j个可以拼成c的前i+j个,0则表示不行,转移方程是if(dp[i][j]&&a[i+1]==c[i+j+1]) dp[i+1][j]=1;if(dp[i][j]&&b[j+1]==c[i+j+1]) dp[i][原创 2016-07-04 19:52:47 · 675 阅读 · 0 评论 -
CCPC长春赛区K题 hdu 5921 Binary Indexed Tree
题目Binary Indexed TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 42 Accepted Submission(s): 7Problem DescriptionRec原创 2016-10-04 18:54:22 · 1605 阅读 · 0 评论