解体思路 这次的 d p dp dp从后面往前面,且采用累加的方式。 设 d p [ i ] dp[i] dp[i]代表当前得分为 i i i的时候,获胜的概率。 那么 d p [ i ] = ( d p [ i + 1 ] + d p [ i + 2 ] + . . . + d p [ i + W ] ) / W , i = 0 , 1 , 2 , . . . , K − 1 dp[i]
A Text Volume 题面: You are given a text of single-space separated words, consisting of small and capital Latin letters. Volume of the word is number of capital letters in the word. Volume of the tex