摘要:
#include int main( ){ int a,b,c,s ; s=0 ;for(a=1; aint main( ){ int a,b,c,s ; s=0 ;for(a=1; a<=9; a++)for(b=0; b<=9; b++)for(c=0; c<=9... 阅读全文
摘要:
#include int main( ){ int a,b,c,i;for(i=100;iint main( ){ int a,b,c,he,i;for(i=100;iint main( ){ int a,b,c,i,s ; s=0 ;for(i=100;iint m... 阅读全文
摘要:
#include int f(int n){ if (n==1) return 1; else return f(n-1)+n; }int main(void){ printf("%d\n",f(100));} 阅读全文
摘要:
hnldyhy// poj 1651 矩阵连乘 DP #include #include using namespace std;int dp[103][103],s[103];int main(){ int n,i,j,k,min; cin>>n; for(i=1;i>s[i]... 阅读全文
摘要:
#include int dp[12888];int w[3408],d[3408];int max(int x,int y) { return x>y?x:y; }int main(){ int n,m,i,j; while(scanf("%d%d",&n,&m)!=EOF... 阅读全文
摘要:
#include#define max(a,b) (a)>(b)?(a):(b)int dp[12888];int w[3408],d[3408];int main(){ int n,m,i,j; while(scanf("%d%d",&n,&m)!=EOF) { for(i=... 阅读全文
摘要:
#includeint main(){int a[10][10];int i,j; for(i=0;i#define N 10int main(){int a[N][N], i,j; for(i=0;i#define N 50void YangHui(int a[][N],int n){ int i... 阅读全文
摘要:
// 动态规划求最少钱币枚数#include int a[20],c[20][3000],k,n;int min(int x,int y){ return x>y?y:x; }int main(){ int i,j; scanf("%d",&k); for (i=0; i=... 阅读全文
摘要:
#includeint max(int x,int y){ int z; if (x>y) z=x; else z=y; return z;}int max(int a,int b){ return a > b ? a : b;}int main(){ int t... 阅读全文
摘要:
#include #include using namespace std;int dp[1005], w[105],v[105],T,M;int max(int x,int y) { return x>y?x:y; }void f( ){ int i,j; for (i... 阅读全文
摘要:
70 371 10069 11 2#include #include using namespace std;int dp[105][1005], w[105],v[105],T,M;int max(int x,int y){ return x>y?x:y; }void f( ){ ... 阅读全文
摘要:
#include #include using namespace std;int dp[105][1005], w[105],v[105],T,M,;int max(int x,int y) { return x>y?x:y; }int f(int x,int y){ int t; if (d... 阅读全文
摘要:
#include #include using namespace std;int dp[105][1005], w[105],v[105],T,M,;int max(int x,int y) { return x>y?x:y; }int f(int x,int y){ int t; if (... 阅读全文
摘要:
rqnoj 15 采药 原创 2015年12月14日 09:03:20 标签: c语言 411 原创 2015年12月14日 09:03:20 标签: c语言 411 题目描述 辰辰是个天资聪颖的孩子,他的梦想是成为世界上最伟大的医师。为此,他想拜附近最有威望的医师为师。医师为了判断他的资质,给他出 阅读全文
摘要:
#include using namespace std;int dp[105][1005],w[105],v[105] ;int max(int a,int b) { return a > b ? a : b; }int f(int x,int y){ int t ; if(dp[x][... 阅读全文
摘要:
#include using namespace std;int dp[105][1005],w[105],v[105] ;int max(int a,int b) { return a > b ? a : b; }int f(int x,int y){ int t ; if(dp[x][... 阅读全文
摘要:
物品质量 w[0] w[1] w[2] ....... w[n] 背包容量c T物品价值 v[0] v[1] v[2] ....... v[n] 物品种类 n N(一)设DP(x,y) 表示 从前x项物品中 取出装入 体积为y的背包 的 物品的... 阅读全文
摘要:
阅读全文
摘要:
#include int f(int a,int b){ if(aint f(int a,int b){ if(b==0) return 1 ; if(a#define MAX 200void main( ){ int... 阅读全文
摘要:
ZOJ 1027/*zoj 1027 poj 1080 思路: 三种状态,取最大值:s1[i]和s2[j]配 :dp[i-1][j-1]+cost[my[s1[i]]][my[s2[j]]];s1[i]和'-' 配: dp[i-1][j]+cost[my[s1[i]]][my['-']];s2[... 阅读全文