2008年9月20日星期六

ZJU/ZOJ 1939 Compromise 解题报告

题目大意是找出两篇文章中的最长公告字串,并输出。

非常经典的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

5 条评论:

  1. 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

    回复删除

相关文章

 
Creative Commons License
除非另有声明,本网站采用知识共享署名-非商业性使用-相同方式共享 3.0 许可协议授权。