USACO3.1.2 Score Inflation (inflate)
来源:互联网 发布:js数组转换成字符串 编辑:程序博客网 时间:2024/04/30 16:57
普通dp问题,dp[i]记录时间为i时最大分数
/*ID:xsy97051LANG:C++TASK:inflate*/#include <iostream>#include <cstdio>#include <cstring>using namespace std;int dp[10000];int main(){freopen("inflate.in","r",stdin);freopen("inflate.out","w",stdout);memset(dp,0,sizeof(dp));int t,m; cin>>t>>m; for(int i=1;i<=m;i++) { int time,score;cin>>score>>time; for(int j=time;j<=t;j++) dp[j]=max(dp[j],dp[j-time]+score); } cout<<dp[t]<<endl; return 0;}
0 0
- USACO3.1.2 Score Inflation (inflate)
- USACO3.1.2 Score Inflation (inflate)
- usaco3.1.1 Score Inflation
- [USACO3.1]总分 Score Inflation
- USACO 3.1 Score Inflation (inflate)
- Score Inflation
- USACO 3.1 Score Inflation
- usaco Score Inflation
- usaco Score Inflation
- USACO:Score Inflation
- USACO-Score Inflation
- usaco Score Inflation
- Score Inflation 总分
- USACO Score Inflation 总分
- USACO 3.1 Score Inflation (完全背包) P2722 总分 Score Inflation
- 【动态规划】【USACO】Score Inflation
- USACO:Score Inflation解题报告
- 【完全背包】Score Inflation 总分
- 录像脑电图费用_名医养生-淮安特色技术专题
- java学习过程中的异常处理方式
- 怎么解决癫痫病人的心理问题
- mysql事务处理(transcation)
- 打印1到最大的N位数
- USACO3.1.2 Score Inflation (inflate)
- linux 程序、动态库、静态库内部添加版本号和编译时间
- 中华中医药癫痫病康复中心_名医养生-淮安新闻网特色技术专题_0
- LeetCode:Search in Rotated Sorted Array II
- Combination Sum
- Cocos2dx3.2编写常用UI组件(五)带滚动的表格GridView
- ubuntu 14.04 重置unity桌面
- Javascript 面相对象与函数处理的疑惑
- 【Eclipse中使用Git之二】Commit代码到本地仓库