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kjinym7n6Rz4rdL+B+GNO5qrKm41IpaResScs3G8SisnaVh46m4ferj1AywS2nv199LPrdP9yDRl6fbT4HNF1VjU+ZouNM/wRhdQll4/atD2X1x8PQ3dit1aa0QdMOwbDEsfpTnhloKTLmIiZB38m9nxmDbfLwesIYG53eVTz8fDYeX8zBafe0LgsT3PMDHalqzwnFFuJha18lVlb0ZtWXCq7+rzr/+HWxMvtamhowuS47HuQpA5NZ8TCmmQTHr5P0+kQ/3lsvlymTNdtRKElAt6ff89i2qTC/o5oMG19m7be2DM9pE5pyFWu6g1/yAL8BHsb//vsvLz+88IjpBBBKB5jeY5GmKfw8Qqx9h26/MJ8avpGl7AoobbauH5mpUw3VKYgT9XbGndyLtPCccT7FMpa1mzyE668O5aae5RPDpp/k5fj4JBaHYcsKa8B3qiw12VZbd73yUNnYwug6y/nGcbBdElrmomQrGq4i4yh9hrQ9jRt3wMNreQnW6OzLHtfLiKGMVgWpLD35hthOPGygsryyLiYpwptxCejOZW3uxUAen/K4X+MGhBAQD4cJbV3WwEE8JGAA8ZCAAcRDgoDnjMEutrvYGg87UVlpmsIJjv47Cwu9KEQk/EnMeoQjesrgHRUqggDxcJjYNZVFPCRgAPGQgAHEQ4KAYyyr608Pb42H7ausTJ6bGLQsW2yhyKEM+PIrK1MnldOoFBE4iIeDxU6pLOIhAQOIhwQMIB4SMGCbPGxZZXGFx6c5xuVXkBW1F5oWnrBer7lf+APopYhAyImHBBwgHhIwgHhIwADiIQEDtszDAJVlzIRyEE5z9F+QLS7CJzUKCagnF49HU2/3FsRDAgYQDwkYQDwkYADxkIABCHnYwliWkntxe05xR171K2RZliSJmNFo/Moy1JH88agUEXLiIQEHiIcEDCAeEjCAeEjAgB552PKMwTRNY/DxYz33NqEp/q3PldRvIeZEKl8Ho+JE4CAeEjCAeEjAAOIhAQOIhwQM2DIP/wdNp8FqbaiRBwAAAABJRU5ErkJggg==" alt="" width="697" height="31" />
#include <stdio.h>
#include <string.h>
#include <algorithm>
#define mem0(a) memset(a,0,sizeof(a))
#define MAX(a, b) (a > b ? a : b)
using namespace std; struct BondsV_I
{
int Value;
int Interest;
}Bonds[];
int Amount, Year, BondsNum;
int dp[];//由于题目说利率不会超过10%,所以也就是不会超过1000*1.1^40,小于50000 int main()
{
int Case;
while(~scanf("%d", &Case))while(Case--)
{
mem0(Bonds);
scanf("%d%d", &Amount, &Year);
scanf("%d", &BondsNum);
for(int i=;i<=BondsNum;i++)
{
scanf("%d %d", &Bonds[i].Value, &Bonds[i].Interest);
Bonds[i].Value/=;//题目说Value都是1000的倍数,所以直接/1000减小复杂度
}
int ans = Amount;
for(int year = ; year <= Year; year ++)//由于存钱的利息一次性投两年和分开投结果没区别,
//甚至一年后可能还会有更好的方式,所以下一年可以只有上一年得到
{
mem0(dp);//dp保存的是这一年所获得的的利息
for(int i=;i<=BondsNum;i++)//对于每一种方式
{
for(int j=Bonds[i].Value;j<=ans/;j++)//由于可以选择任意多个,所以是完全背包
{ //Value/1000,所以相应的钱/1000
dp[j] = MAX(dp[j-Bonds[i].Value] + Bonds[i].Interest, dp[j]);
}
}
ans += dp[ans/];//更新这一年获得的数目
}
printf("%d\n", ans);
}
return ;
}
HDU1963Investment(DP)的更多相关文章
- LightOJ 1033 Generating Palindromes(dp)
LightOJ 1033 Generating Palindromes(dp) 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid= ...
- lightOJ 1047 Neighbor House (DP)
lightOJ 1047 Neighbor House (DP) 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87730# ...
- UVA11125 - Arrange Some Marbles(dp)
UVA11125 - Arrange Some Marbles(dp) option=com_onlinejudge&Itemid=8&category=24&page=sho ...
- 【POJ 3071】 Football(DP)
[POJ 3071] Football(DP) Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4350 Accepted ...
- 初探动态规划(DP)
学习qzz的命名,来写一篇关于动态规划(dp)的入门博客. 动态规划应该算是一个入门oier的坑,动态规划的抽象即神奇之处,让很多萌新 萌比. 写这篇博客的目标,就是想要用一些容易理解的方式,讲解入门 ...
- Tour(dp)
Tour(dp) 给定平面上n(n<=1000)个点的坐标(按照x递增的顺序),各点x坐标不同,且均为正整数.请设计一条路线,从最左边的点出发,走到最右边的点后再返回,要求除了最左点和最右点之外 ...
- 2017百度之星资格赛 1003:度度熊与邪恶大魔王(DP)
.navbar-nav > li.active > a { background-image: none; background-color: #058; } .navbar-invers ...
- Leetcode之动态规划(DP)专题-详解983. 最低票价(Minimum Cost For Tickets)
Leetcode之动态规划(DP)专题-983. 最低票价(Minimum Cost For Tickets) 在一个火车旅行很受欢迎的国度,你提前一年计划了一些火车旅行.在接下来的一年里,你要旅行的 ...
- 最长公共子序列长度(dp)
/// 求两个字符串的最大公共子序列长度,最长公共子序列则并不要求连续,但要求前后顺序(dp) #include <bits/stdc++.h> using namespace std; ...
随机推荐
- 配置域名服务器报错named[822]: dns_rdata_fromtext /etc/bind/db.asertest.com mail not a valid number
问题描述: 为了配置邮件服务器,更改了相关域名,改完后,重启bind9报错 Mar 17 14:39:39 DnsServer2 named[822]: dns_rdata_fromtext: /et ...
- DOM对象常用对象的方法和属性
HTML文档中的常用节点类型: 接口 nodeType 备注 Element 1 元素节点 Text 3 文本节点 Document 9 Document Comment 8 注释文本 Docum ...
- DelegatingFilterProxy
安全过滤器链 Spring Security的web架构是完全基于标准的servlet过滤器的. 它没有在内部使用servlet或任何其他基于servlet的框架(比如spring mvc), 所以它 ...
- python练习程序(c100经典例3)
题目: 一个整数,它加上100后是一个完全平方数,再加上168又是一个完全平方数,请问该数是多少? for i in range(1,100000): a=i+100; b=a+168; sa=int ...
- 凸优化简介 Convex Optimization Overview
最近的看的一些内容好多涉及到凸优化,没时间系统看了,简单的了解一下,凸优化的两个基本元素分别是凸函数与凸包 凸集 凸集定义如下: 也就是说在凸集内任取两点,其连线上的所有点仍在凸集之内. 凸函数 凸函 ...
- 【英语】Bingo口语笔记(62) - 生气道歉场景的表达
- 查看mysql库大小,表大小,索引大小
查看所有库的大小 mysql> use information_schema; Database changed mysql> selectconcat(round(sum(DATA_LE ...
- mysql (master/slave)复制原理及配置
1 复制概述 Mysql内建的复制功能是构建大型,高性能应用程序的基础.将Mysql的数据分布到多个系统上去,这种分布的机制,是通过将Mysql的某一台主机的数据复制到其它主机(slaves)上,并重 ...
- js处理日期的一些整理(js获取给定日期前一天的日期)
var date = new Date(); alert(date);//获取当前时间 alert(date.getFullYear());//获取当前年分 alert(date.getMonth() ...
- DOMContentLoaded事件
今天查看百度空间源代码,发现多了个util.js文件,打开看看.里面里面定义了addDOMLoadEvent.这是干什么用的? 仔细查看代码,发现在Mozilla添加了DOMContentLoaded ...