• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            付翔的專欄
            在鄙視中成長 記錄成長的點滴
            posts - 106,  comments - 32,  trackbacks - 0

            Common Permutation



            Given two strings a and b, print the longest string x of letters such that there is a permutation of x that is a subsequence of a and there is a permutation of x that is a subsequence of b.

            Input

            The input file contains several cases, each case consisting of two consecutive lines. This means that lines 1 and 2 are a test case, lines 3 and 4 are another test case, and so on. Each line contains one string of lowercase characters, with first line of a pair denoting a and the second denoting b. Each string consists of at most 1,000 characters.

            Output

            For each set of input, output a line containing x. If several x satisfy the criteria above, choose the first one in alphabetical order.

            Sample Input

            pretty
            women
            walking
            down
            the
            street

            Sample Output

            e
            nw
            et

            求兩個字符串的公共部分 排序后即可得出
            my code

            posted on 2010-03-18 09:09 付翔 閱讀(387) 評論(0)  編輯 收藏 引用 所屬分類: ACM 數據結構

            <2011年5月>
            24252627282930
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            CSDN - 我的blog地址

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            婷婷综合久久中文字幕蜜桃三电影 | 精品无码久久久久久午夜| 亚洲成色WWW久久网站| 久久久久99精品成人片欧美| 99久久精品午夜一区二区| 大蕉久久伊人中文字幕| 精品久久久久久久久免费影院| 国产成年无码久久久免费| 色综合久久综精品| 一本色道久久99一综合| 精品国产91久久久久久久a| 久久亚洲精品成人无码网站| 精品久久久久久久| 亚洲欧洲精品成人久久奇米网| 狠狠色丁香婷婷综合久久来来去| 久久WWW免费人成—看片| 99久久综合狠狠综合久久止| 亚洲欧美伊人久久综合一区二区 | 亚洲中文字幕伊人久久无码| 香蕉久久夜色精品升级完成| 精品久久国产一区二区三区香蕉 | 久久婷婷五月综合成人D啪| 久久精品视频一| 国产99久久久久久免费看| 奇米影视7777久久精品| 蜜臀久久99精品久久久久久| 久久精品成人欧美大片| 香蕉久久影院| 日本福利片国产午夜久久| 久久久久一本毛久久久| 精品久久久久久久| 久久精品无码一区二区app| 久久93精品国产91久久综合| 久久99国产精品久久| 伊人久久大香线蕉综合影院首页| 精品水蜜桃久久久久久久| 久久国产精品一区| 色综合久久中文字幕综合网| 国产亚洲美女精品久久久| 青青热久久国产久精品| 综合久久给合久久狠狠狠97色|