上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 46 下一页
摘要: Stamps and Enovelope Size 题意: 给你最多贴S张邮票。有N个邮票集合,每个集合有不同的面值。问哪个集合的最大连续邮资最大,输出最大连续邮资和集合元素。 如果不止一个集合结果相同,输出集合元素少的,如果仍相同,输出最大面值小的。 思路: 最开始直接进行的深搜,感觉应该会TL, 阅读全文
posted @ 2015-11-09 22:45 Przz 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题意: 给你一串数字,要求你对其进行折叠使其长度最短。 折叠情况:全是一个字母 & 重复的字符串 AAAAAAAAAABABABCCD --> 9(A)3(AB)CCD NEERCYESYESYESNEERCYESYESYES --> 2(NEERC3(YES)) 思路: 用dp[i][j]表示从 阅读全文
posted @ 2015-11-09 22:37 Przz 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题意: 给你一个残缺的塔,每个数字由他下面左右两个数相加得。给你其中一部分,要求输出全部的数字。 阅读全文
posted @ 2015-11-09 22:29 Przz 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Cake Slicing 题意:有一个n行m列的网格上有一些黑点,要求进行切割,使最后每块上只有一个黑点,求最少的刀数 思路:记忆化搜索,枚举每一条边来切,每一次搜索自己所能切割的所有情况取最小值 但是TL,纠结了一下,发现明明2个for(横+竖)就能切出来,硬是被我写成了n^2 的,自己好坑- - 阅读全文
posted @ 2015-11-09 22:26 Przz 阅读(159) 评论(0) 推荐(0) 编辑
摘要: UVA 10118 题意: 有4堆糖果,每堆有n(最多40)个,有一个篮子,最多装5个糖果,我们每次只能从某一堆糖果里拿出一个糖果, 如果篮子里有两个相同的糖果,那么就可以把这两个(一对)糖果放进自己的口袋里,问最多能拿走多少对糖果。糖果种类最多20种. 思路:记忆化搜索 Orz:在输入的时候不小心 阅读全文
posted @ 2015-11-04 13:56 Przz 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Input The first line contains an integer T indicating the total number of test cases. Each test case starts with an integer n in one line, then one li 阅读全文
posted @ 2015-11-04 13:52 Przz 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Input The first line contains a integer T indicating the total number of test cases. Each test case begins with an integer n, denoting the number of s 阅读全文
posted @ 2015-11-04 13:45 Przz 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Input The first line contains an integer T indicating the total number of test cases. Each test case starts with an integer n in one line, then one li 阅读全文
posted @ 2015-11-04 13:39 Przz 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Input The first line of input contains an integer T indicating the total number of test cases. The first line of each test case is an integer n, indic 阅读全文
posted @ 2015-11-04 13:33 Przz 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Input The first line contains an integer T indicating the total number of test cases. First line of each test case is a line with two integers n,m. Th 阅读全文
posted @ 2015-11-04 13:26 Przz 阅读(231) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 46 下一页