![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
动态规划
chao887062
面对那么多别人看来是"水题"的题,我只能无奈的一次次WA,顽强的WA着....
展开
-
单调递增子序列(O(nlogn))
#include"stdio.h"#include"string.h"int a[100000+10],b[100000+10];int search(int c,int d){ int high=d,low=1,mid; while(low<=high) { mid=(low+high)/2; if(c>b[mid]) low=mid+1;原创 2012-05-30 22:04:00 · 492 阅读 · 0 评论 -
开心的小明
开心的小明http://acm.nyist.net/JudgeOnline/problem.php?pid=49初学动态规划,写篇文章能够记录自己的成长。#include"stdio.h"#include"string.h" int p[500000+10];int main(){int v[50],w[50],i,j,n,num,max,temp;scanf("%d",原创 2012-05-21 22:19:03 · 2843 阅读 · 0 评论 -
擅长排列的小明 II
擅长排列的小明 IIhttp://acm.nyist.net/JudgeOnline/problem.php?pid=469#include"stdio.h"int a[60];int main(){ int i,n,j,m; a[1]=1;a[2]=1;a[3]=2;a[4]=4; for(i=5;i<=60;i++) a[i]=a[i-3]+a[i-1]+1;原创 2012-05-21 22:13:37 · 656 阅读 · 0 评论