HBC52815DamsindistressHeartstone题解

庄子墨 算法基础篇 52 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
Bobo is playing *Heartstone*. There are n minions in the battlefield. The i-th minion has hih_ihi hit points . Bobo uses two kinds of magic. The one is *Arcane Shot* and the other is *Frostbolt*. *Arcane Shot* can deal **two** points damage to a minion , while *Frostbolt* can deal **three** points damage. A minion is killed when its HP is less or equal to zero. Let f be the minimum number of *Frostbolt* required to kill all minions, if no more than a *Arcane Shot* are used. Bobo would like to find out f+f++ff + f + dots + ff+f++f modulo .

Bobo is playing *Heartstone*. There are n minions in the battlefield. The i-th minion has hih_ihi​ hit points (HP). Bobo uses two kinds of magic. The one is *Arcane Shot* and the other is *Frostbolt*. *Arcane Shot* can deal **two** points damage to a minion (that is to decrease the minion's HP by two), while *Frostbolt* can deal **three** points damage. A minion is killed when its HP is less or equal to zero. Let f(a) be the minimum number of *Frostbolt*(s) required to kill all minions, if no more than a *Arcane Shot*(s) are used. Bobo would like to find out f(0)+f(1)+⋯+f(m)f(0) + f(1) + dots + f(m)f(0)+f(1)+⋯+f(m) modulo (109+7)(10^9+7)(109+7).

HBC52815DamsindistressHeartstone题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
全网最全C++题库,助您挑战自我,突破极限,成为编程领域的佼佼者!

标签: HBC52815DamsindistressHeartstone题解