• <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 數據結構

            <2010年7月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            CSDN - 我的blog地址

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久久久四虎国产精品| 久久亚洲AV无码精品色午夜| 国产精品无码久久综合网| 欧美粉嫩小泬久久久久久久| 人妻精品久久无码专区精东影业| 久久国产乱子精品免费女| 久久夜色撩人精品国产小说| 色婷婷综合久久久久中文| 久久99精品久久久久久不卡 | 国产精品久久毛片完整版| 久久久艹| 精品久久人人妻人人做精品| 亚洲va久久久噜噜噜久久天堂| 国产激情久久久久影院小草| 婷婷伊人久久大香线蕉AV | 精品无码久久久久久尤物| 久久亚洲精品无码播放| 曰曰摸天天摸人人看久久久| 日韩精品久久无码人妻中文字幕| 三级韩国一区久久二区综合| 夜夜亚洲天天久久| 久久免费精品一区二区| 成人国内精品久久久久一区| 亚洲AV成人无码久久精品老人| 一级女性全黄久久生活片免费| 久久国产精品偷99| 99热都是精品久久久久久| 26uuu久久五月天| 国产成人无码精品久久久久免费| 99久久99久久| 久久久91精品国产一区二区三区| 精品综合久久久久久888蜜芽| 蜜臀久久99精品久久久久久小说 | 国产一区二区三精品久久久无广告 | 久久久久久久久久免免费精品 | 亚洲伊人久久精品影院| 97久久国产露脸精品国产| 三上悠亚久久精品| 久久亚洲美女精品国产精品| 精品乱码久久久久久久| 久久精品免费一区二区三区|