Here
背包问题没啥特别的。这里求>=P的条件下的,有个小技巧,
>=P
可以init 背包到 dp[P + 1][G + 1]这样的话,大于的P也扔到dp[P]上
dp[P + 1][G + 1]
P
dp[P]
额。。。最后求和的时候overflow也要考虑