上一页 1 2 3 4 5 6 ··· 33 下一页
摘要: 题目描述: 有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第n行第m列的格子有几种方案,答案对1000000007取模。 Input Output Input示例 Output示例 阅读全文
posted @ 2017-02-15 18:49 20143605 阅读(402) 评论(0) 推荐(0) 编辑
摘要: Description Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, 阅读全文
posted @ 2017-01-24 17:55 20143605 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of c 阅读全文
posted @ 2017-01-17 16:02 20143605 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Description String analysis often arises in applications from biology and chemistry, such as the study of DNA and protein molecules. One interesting p 阅读全文
posted @ 2016-11-23 00:27 20143605 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 题目大意:有n张钞票,面值可能不同。你要买一件东西,可能需要找零钱。问最少付多少钱,并求出最少的钞票张数。 题目分析:定义状态dp(i,w)a56爆大奖在线娱乐前i张钞票凑成w元需要的最少钞票张数。则状态转移方程为dp(i,w)=min(dp(i-1,w),dp(i-1,w-a(i))+1)。其中a(i)为第i张钞 阅读全文
posted @ 2016-11-19 21:37 20143605 阅读(511) 评论(0) 推荐(0) 编辑
摘要: Description Given a string, find a substring of it which the original string contains exactly n such substrings. Description Given a string, find a su 阅读全文
posted @ 2016-11-17 22:56 20143605 阅读(311) 评论(0) 推荐(0) 编辑
摘要: Description Given two strings, you have to tell the length of the Longest Common Substring of them. For example: str1 = banana str2 = cianaic So the L 阅读全文
posted @ 2016-11-09 22:30 20143605 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Rescue the Rabbit Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2036 Accepted Submission(s): 阅读全文
posted @ 2016-11-03 16:33 20143605 阅读(224) 评论(0) 推荐(0) 编辑
摘要: Description Great! Your new software is almost finished! The only thing left to do is archiving all your n resource files into a big one. Wait a minut 阅读全文
posted @ 2016-11-01 21:50 20143605 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 题目大意:给出的m个字符串都有一个权值。用小写字母构造一个长度不超过n的字符串S,如果S包含子串s,则S获取s的权值。输出具有最大权值的最小字符串S。 题目分析:先建立AC自动机。定义状态dp(step,u)a56爆大奖在线娱乐长度为step、在u节点上的最大权值。状态转移方程为:dp(step,u)=max(dp 阅读全文
posted @ 2016-10-26 19:32 20143605 阅读(234) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 33 下一页