DP记录方案数,同时记录前一个状态以此推出路径。状态转移方程是f[i]=sum(f[j])(f[j]>0)(1<=i<=sum-tw,0<=j<i),注意若当前重量方案数不为0则不必更新此状态的前一个状态的记录。
注意读懂题意(用来DP的重量应该是所有牌的重量和-剩余牌的重量)和判无解数据(牌的总和小于剩余和)......
R1077424 Accepted 100 From IwfWcf P1071 FPC Vivid Puppy 2008-11-26 17:33:47
DP记录方案数,同时记录前一个状态以此推出路径。状态转移方程是f[i]=sum(f[j])(f[j]>0)(1<=i<=sum-tw,0<=j<i),注意若当前重量方案数不为0则不必更新此状态的前一个状态的记录。
注意读懂题意(用来DP的重量应该是所有牌的重量和-剩余牌的重量)和判无解数据(牌的总和小于剩余和)......
R1077424 Accepted 100 From IwfWcf P1071 FPC Vivid Puppy 2008-11-26 17:33:47
vikings jerseys
回复删除ugg boots outlet
cheap rolex watches
cheap jordan retro
longchamp handbags
coach outlet online
ugg boots clearance
michael kors outlet
coach handbags new
polo outlet
201612.26chenjinyan
chi flat iron
回复删除ugg outlet
cheap uggs
holliste sale
timberland boots
hermes belt
coach outlet
nike roshe run
christian louboutin
cheap nike air max
20170112caiyan
kyrie 6 shoes
回复删除nmd
zx flux
air max 97
yeezy boost 350 v2
nike sneakers for men
yeezy shoes
yeezy supply
kd 12 shoes
jordan shoes
navigate heremoved here Check This Outfind out navigate to this websiteher comment is here
回复删除