由于限定了开始位置,因此从上往下推比从下往上推更方便,最后输出max(f[n,m shr 1],f[n,m shr 1+1],f[n,m shr 1+2])即可。
状态转移方程是f[i,j]:=max(f[i-1,j-1],f[i-1,j],f[i-1,j+1])+map[i,j](1<=i<=m,i<=j<=n);
R1070996 Accepted 100 From IwfWcf P1364 FPC Vijos Dragon 2008-11-19 13:08:33
由于限定了开始位置,因此从上往下推比从下往上推更方便,最后输出max(f[n,m shr 1],f[n,m shr 1+1],f[n,m shr 1+2])即可。
状态转移方程是f[i,j]:=max(f[i-1,j-1],f[i-1,j],f[i-1,j+1])+map[i,j](1<=i<=m,i<=j<=n);
R1070996 Accepted 100 From IwfWcf P1364 FPC Vijos Dragon 2008-11-19 13:08:33
oakley sunglasses wholesale, http://www.oakleysunglasses-wholesale.us.com/
回复删除ugg boots, http://www.uggbootscheap.eu.com/
ralph lauren uk, http://www.ralphlaurenoutletuk.org.uk/
thomas sabo uk, http://www.thomassabos.co.uk/
michael kors factory outlet, http://www.michaelkorsfactoryoutletonline.com/
michael kors factory outlet, http://www.michaelkorsfactoryoutlets.in.net/
michael kors handbags, http://www.michaelkorshandbagsoutletstore.us.com/
oakley sunglasses, http://www.oakleysunglasseswholesale.in.net/
oakley, http://www.occhialioakleyoutlets.it/
oakley sunglasses wholesale, http://www.oakleysunglasseswholesale.us.com/
tory burch shoes, http://www.toryburchshoesoutlet.com/
pandora jewelry, http://www.pandorajewelryoutlet.us.com/
hollister uk, http://www.hollistershirts.co.uk/
cheap nba jerseys, http://www.nbajerseys.net/
fitflop, http://www.fitflop.in.net/
louis vuitton, http://www.borselouisvuittonoutlet.it/
juicy couture outlet, http://www.juicycoutureoutlet.net/
coach outlet, http://www.coachoutletus.us/
oakley sunglasses, http://www.oakley.in.net/
rolex watches uk, http://www.rolexwatches-uk.co.uk/
longchamp outlet, http://www.longchampoutlet.name/
michael kors bags, http://www.michaelkorsbags.uk/
michael kors outlet, http://www.michaelkors-outlets.us.com/
ugg boots, http://www.uggbootsclearance.in.net/
nike air max shoes, http://www.nikeairmaxshoess.co.uk/
links of london, http://www.linksoflondons.co.uk/
michael kors outlet, http://www.michaelkorsoutletusa.net/
designer handbags, http://www.designerhandbags.us.com/
ray ban sunglasses, http://www.raybansunglass.co.uk/
1003maoqiuyun
ray bans uk
回复删除cheap oakley sunglasses
true religion
uggs outlet
replica rolex watches
hollister outlet
north face
heat jerseys
coach factory outlet
uggs outlet
201612.26chenjinyan
nmd adidas
回复删除celine outlet store
converse trainers
toms outlet store
cheap uggs
moncler outlet
rolex watches
true religion outlet
nmd shoes
fit flops
20170112caiyan
polo ralph lauren
回复删除coach outlet
nike outlet store
ralph lauren outlet
ferragamo outlet
discount oakley sunglasses
coach outlet online
cheap ray ban sunglasses