https://atcoder.jp/contests/abc261/tasks/abc261_d
D - Flipping and Bonus
Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 400400 points
Problem Statement
Takahashi will toss a coin NN times. He also has a counter, which initially shows 00.
Depending on the result of the ii-th coin toss, the following happens:
- If it heads: Takahashi increases the counter's value by 1 and receives Xi yen (Japanese currency).
- If it tails: he resets the counter's value to 0, without receiving money.
Additionally, there are MM kinds of streak bonuses. The i-th kind of streak bonus awards Yi yen each time the counter shows Ci.
Find the maximum amount o

该博客详细介绍了Atcoder Beginner Contest 261中D题——翻转与奖励的题目内容和解题思路。问题涉及到在一系列硬币翻转游戏中,如何最大化获得的奖金,其中包括连胜奖励。文章讨论了如何通过动态规划来解决这个问题,并给出了代码实现。
最低0.47元/天 解锁文章
4612

被折叠的 条评论
为什么被折叠?



