动态规划
文章平均质量分 82
寒山小妖
你被别人嫉妒说明你卓越,你嫉妒别人说明你无能。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
部分和问题
部分和问题 题目:给定整数a1,a2,...,an,判断是否可以从中选出若干个数,使他们的和恰好为k。 限定条件:1 输入: 4 1 2 4 7 13 4 1 2 4 7 15 输出: Yes No //解法一:这段代码是我根据01背包的思想做的,我把问题看成是容量为k的背包,有n件体积和价值都为a[i]的物品,求出背包能装的最大价值,如果最大价值正好等于背包容量,也就是原创 2016-09-05 13:52:48 · 541 阅读 · 0 评论 -
Common Subsequence(LCS最长公共子序列)
Common Subsequence Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%lld & %llu Description A subsequence of a given sequence is the given sequence with some elements (possible原创 2016-08-07 23:20:54 · 457 阅读 · 2 评论 -
免费馅饼(数塔)
免费馅饼 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12017 Accepted Submission(s): 3997 Description 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉原创 2016-08-07 22:26:49 · 510 阅读 · 3 评论 -
Charm Bracelet(01背包)
Charm Bracelet Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Description Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd原创 2016-08-07 19:29:05 · 456 阅读 · 5 评论 -
The Triangle(数塔)
The Triangle Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%lld & %llu Description 7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 s原创 2016-08-02 15:21:01 · 383 阅读 · 0 评论 -
Filthy Rich(数塔)
Filthy Rich Problem Description They say that in Phrygia, the streets are paved with gold. You’re currently on vacation in Phrygia, and to your astonishment you discover that this is to be taken原创 2016-07-17 14:31:21 · 636 阅读 · 0 评论
分享