
动态规划
文章平均质量分 58
fantaticmen
如果有讲的不详细的或者错误的可以加鹅细聊+934591874
展开
-
HDU 1159 Common Subsequence
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 37467 Accepted Submission(s): 17166Problem DescriptionA subsequence of a given sequence is t原创 2017-03-25 21:45:56 · 385 阅读 · 0 评论 -
动态规划 LIS
求连续最长子序列#include <iostream> using namespace std;const int maxn = 1000+10; int count[maxn],arr[maxn]; int main() { int n,ans = 0; cin >> n;//原序列的长度 for(int i = 0;i < n;i++) { count[原创 2017-03-05 22:51:12 · 422 阅读 · 0 评论 -
算法训练 K好数 解析
算法训练 K好数 时间限制:1.0s 内存限制:256.0MB 提交此题 锦囊1 锦囊2 问题描述 如果一个自然数N的K进制表示中任意的相邻的两位都不是相邻的数字,那么我们就说这个数是K好数。求L位K进制数中K好数的数目。例如K = 4,L = 2的时候,所有K好数为11、13、20、22、30、31、33 共7个。由于这个数目很大,请你输出它对1000000007取模后的值。输原创 2017-04-05 19:08:34 · 2576 阅读 · 2 评论 -
HDU 1171 Big Event in HDU dp背包
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 40976 Accepted Submission(s): 14090Problem Description Nowadays, we all know that Computer原创 2017-05-20 21:24:52 · 297 阅读 · 0 评论 -
hdu 1864 最大报销额 01背包
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 24860 Accepted Submission(s): 7618Problem Description 现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、原创 2017-05-21 00:18:59 · 309 阅读 · 0 评论 -
poj 3280 区间dp
Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID tag that the system will read as the cows pass by原创 2017-07-26 00:16:00 · 414 阅读 · 0 评论 -
poj 1976 01背包
A train has a locomotive that pulls the train with its many passenger coaches. If the locomotive breaks down, there is no way to pull the train. Therefore, the office of railroads decided to distribute原创 2017-07-26 00:52:09 · 461 阅读 · 0 评论