题目大意是给出m个长度为3的字串,用0-9组合成长度为n的字串,如果字串中能够匹配这m个字串则能够得到相应的加/减分。求得分最高的字串,当得分相同时输出字串对应数值最小的。
用f[i,j]表示匹配到第i个字符,第i位和第i+1位组成的字串为j时的最高得分。状态转移方程是f[i,k*10+j div 10]=max(f[i,k*10+j div 10],f[i+1,j]+v[k*100+j])(0<=k<=9,0<=j<=99);k即第i位上的数,j即第i+1位和i+2位上的数,v[k*100+j]即第i位到第i+2位所组成的三位字串的得分。用一个数组记录下f[i,k*10+j div 10]是由f[i+1,j]变化而得,最后从max(f[1,j])(当有多个最大值时,j取最小值)顺推即可得到所求字串。
1663079 2008-10-10 23:18:07 Accepted 1206 FPC 470 4924 IwfWcf@LZOI
qihang0922,kevin durant shoes
回复删除chaussure louboutin
hollister
ed hardy clothing
basketball shoes
longchamp outlet
longchamp
nike free run
swarov ski jewelry
nike air max
mcm handbags
toms outlet
nike sb
uggs boots on sale
ray ban sunglasses
nike free runs
polo outlet
nike huarache
nike air max 90
tods outlet
abercrombie and fitch
supra shoes
instyler curling iron
nike cortez
christian louboutin shoes
mcm outlet
louis vuitton borse
kate spade uk
gucci outlet
canada goose outlet
instyler max
tory burch outlet
ralph lauren outlet
gucci borse
jordan pas cher
ugg boots
longchamp handbags
air max
q
chenlina20160429
回复删除cheap ray ban sunglasses
ray ban sunglasses
michael kors outlet
true religion outlet
michael kors handbags
tiffany jewelry
michael kors handbags
coach factory outlet
ray ban sunglasses
oakley sunglasses
true religion outlet
ray ban sunglasses discount
michael kors uk
ray ban sunglasses
kate spade handbags
cheap jerseys
coach outlet store online clearances
kate spade handbags
louboutin
toms shoes
christian louboutin outlet
hollister outlet
pandora jewelry
timberland outlet
jordan 4 toro
air max 90
michael kors outlet clearance
ray ban sunglasses
nike blazers
oakley sunglasses outlet
michael kors canada
burberry scarf
toms shoes
supra shoes
louis vuitton purses
adidas originals store
canada goose jackets
coach outlet
louis vuitton outlet
michael kors outlet
as
cheap oakley sunglasses
回复删除spurs jerseys
louis vuitton handbags
coach outlet
toms sale
broncos jerseys
ray ban sunglasses outlet
kate spade outlet
ugg pas cher
chanel handbags
201612.26chenjinyan
vans shoes
回复删除ray ban
ferragamo
soccer shoes
true religion jeans
true religion outlet
links of london
longchamp
parajumpers
oakley sunglasses
2017.12.19xukaimin
The MEGA888 (Mega 888) mobile slot game will provide players with the best gaming slot experience. There are a lot of online casino slot games and fantasy
回复删除“Mega” means big and 888 means luck. Mega888 is the online casino that is big in games and winnings.
MEGA888
Thansk for sharing What an interesting site you have i really take a good look buy cocaine online and you can also take a good look at our blog too for more information buy crack cocaine online we also recommend you to take a good look at this site too they have good content buy mdma crystals online more of the site still want you to take a closer look too as they have really good content buy crystal meth online thanks for using your time to check on the link.
回复删除Buy weed online - Weed for sale
回复删除Order marijuana online - Buy weed online
Buy Hybrid Weed strain online
sativa weed for sale