UKIEPC2017 . Flipping Coins(动态规划)

在UKIEPC2017比赛中,面临一个包含N个正面朝下的硬币和K次翻转机会的游戏。玩家的目标是在翻转结束后获得最多正面朝上的硬币。通过优化策略,找出在所有可能的结果中,预期的最大平均获胜硬币数。输入包括硬币数量N和翻转次数K,要求输出精确到10^-6的预期正面硬币数。
摘要由CSDN通过智能技术生成

问题 F: Flipping Coins

时间限制: 1 Sec  内存限制: 128 MB  Special Judge
提交: 129  解决: 58
[提交] [状态] [讨论版] [命题人:admin]

题目描述

Here’s a jolly and simple game: line up a row of N identical coins, all with the heads facing down onto the table and the tails upwards, and for exactly K times take one of the coins, toss it into the air, and replace it as it lands either heads-up or heads-down. You may keep all of the coins that are face-up by the end.
Being, as we established last year, a ruthless capitalist, you have resolved to play optimally to win as many coins as you can. Across all possible c

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值