百练/ 北京大学2016研究生推免上机考试(校内)E: Exchange Rates (动态规划)

本博客主要介绍了一道来源于北京大学2016年研究生推免上机考试的题目——2421: Exchange Rates。题目涉及货币兑换,要求利用动态规划策略在预知的汇率波动中最大化加元收益。通过输入预测的未来汇率,计算在考虑3%交易佣金和精确到分的情况下,如何交易以获得最多加元。博客提供了样例输入、输出及解题思路,重点在于一维动态规划的运用。
摘要由CSDN通过智能技术生成

题目来源:http://noi.openjudge.cn/ch0206/2421/

2421: Exchange Rates

总时间限制: 1000ms  内存限制: 65536kB

描述

Nowthat the Loonie is hovering about par with the Greenback, you have decided touse your $1000 entrance scholarship to engage in currency speculation. So yougaze into a crystal ball which predicts the closing exchange rate betweenCanadian and U.S. dollars for each of the next several days. On any given day,you can switch all of your money from Canadian to U.S. dollars, or vice versa,at the prevailing exchange rate, less a 3% commission, less any fraction of acent. 
Assuming your crystal ball is correct, what's the maximum amount of money youcan hav

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值