题目大意是找出两篇文章中的最长公告字串,并输出。
非常经典的DP,输出具体序列的处理方法有很多,我闲麻烦直接在DP过程中用ansistring记录当前位置的最长公告字串,DP完成后就直接输出......状态转移方程是f[i,j]=max(f[i-1,j],f[i,j-1])(word1[i]<>word2[j]);f[i,j]=max(f[i-1,j-1]+1,max(f[i-1,j],f[i,j-1]));(word1[i]=word2[j])。f[i,j]表示第一篇文章前i个单词与第二篇文章前j个单词匹配所得的最长公告字串的长度,word1[i]即第一篇文章的第i个单词,word2[j]即第二篇文章的第j个单词。
1648397 2008-09-20 14:20:38 Accepted 1939 FPC 0 648 IwfWcf
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
It was truly informative
回复删除http://caravank.com/factory/
http://caravank.com/for-sale-in-riyadh/
http://caravank.com/withdrawn-for-sale/
http://caravank.com/withdrawal-rooms/
michael kors outlet online
回复删除stephen curry shoes
reebok outlet
off white nike
jordan shoes
jordan shoes
moncler outlet
moncler
baseball jerseys
vans outlet
nike air max
回复删除ferragamo belt
air jordan
air jordan
supreme outlet
fila shoes
christian louboutin outlet
yeezys
balenciaga shoes
hermes birkin
you can check here i thought about this try this Dolabuy Dior go to this site this website
回复删除