九度oj 1114
来源:互联网 发布:java中setscale 编辑:程序博客网 时间:2024/06/08 13:37
#include<iostream>#include<string.h>using namespace std;int main(){ int n; int dp[25][41]; while(cin>>n) { memset(dp,0,sizeof(dp)); dp[0][0]=1; for(int i=1;i<=n;i++) { int b; cin>>b; for(int j=0;j<=41;j++) { if(j<b) { dp[i][j]=dp[i-1][j];} else { dp[i][j]=dp[i-1][j]+dp[i-1][j-b]; } } } cout<<dp[n][40]<<endl; } }
0 0
- 九度oj 1114
- 【九度OJ】:九度OJ 1050
- 【九度OJ】:九度OJ 1053
- 【九度OJ】:九度OJ 1056
- 【九度OJ】:九度OJ 1059
- 【九度OJ】:九度OJ 1206
- 九度oj-1114-神奇的口袋
- 九度OJ 1114 神奇的口袋
- 九度OJ:1000
- 【九度OJ】 1006
- 九度 OJ 1499
- 九度OJ-1002
- 九度OJ-1003
- 九度OJ 1004
- 九度OJ 1003
- 九度oj 采药
- 九度OJ 1001
- 九度OJ 1015
- eclipse到Android Studio的项目迁移
- Eclipse生成的java class文件通过java命令行调用提示Exception in thread "main" java.lang.NoClassDefFoundError
- 启动Tomcat提示:指定的服务未安装
- CF251A. Points on Line
- 5.2 继承体系下的对象构造
- 九度oj 1114
- mysql 修改root密码 admin数据库消失解决方法
- 辛星简译MySQL中的last_query_cost
- Android设置状态栏颜色
- Codeforces 35E(区间更新)
- mysql主从备份读写分享
- 为何ViewController释放后不走dealloc
- Install boost library for Visual Studio 2012
- ajax-3种数据传输的实现方法(使用jQuery)