HBC229641卡牌游戏,数学,概率期望,思维Problem B. sophistry题解 (每日一词:xiaot)

痛心疾首 STL编程 46 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
In Xiao K's QQ group, Xiao T always gets weird and weird. Xiao T will speak in the group for nnndays, and xiao K has an anger value of mmm. Xiao T has an ability value every day, and the ability value on day iiiis aia_iai. Every day, Xiao T will choose whether to laugh at Xiao K. If Xiao T chooses to laugh at Xiao K on day iii, Xiao K will be hurt by aia_iaifrom Xiao T. On this basis, if Xiao T's ability value aia_iaiexceeds Xiao K's anger value mmm, Xiao K will be furious and ban Xiao T for ddddays. That is to say, in i+1,i+2,...,mini+1, i+2, ..., mini+1,i+2,...,mindays, Xiao T will be banned. Now, Xiao T wants to maximize the damage to Xiao K, but Xiao T is too bad to solve this problem, so he found you. hope you can help him solve this problem. You only need to find out the maximum damage caused by Xiao T to Xiao K.

In Xiao K's QQ group, Xiao T always gets weird and weird. Xiao T will speak in the group for nnn days, and xiao K has an anger value of mmm. Xiao T has an ability value every day, and the ability value on day iii is aia_iai​. Every day, Xiao T will choose whether to laugh at Xiao K. If Xiao T chooses to laugh at Xiao K on day iii, Xiao K will be hurt by aia_iai​ from Xiao T. On this basis, if Xiao T's ability value aia_iai​ exceeds Xiao K's anger value mmm, Xiao K will be furious and ban Xiao T for   ddd  days. That is to say, in i+1,i+2,...,min⁡(i+d,n)i+1, i+2, ..., min(i+d, n)i+1,i+2,...,min(i+d,n) days, Xiao T will be banned. Now, Xiao T wants to maximize the damage to Xiao K, but Xiao T is too bad to solve this problem, so he found you. hope you can help him solve this problem. You only need to find out the maximum damage caused by Xiao T to Xiao K.

标签: HBC229641卡牌游戏 数学 概率期望 思维Problem B. sophistry题解