• <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 付翔 閱讀(380) 評論(0)  編輯 收藏 引用 所屬分類: ACM 數據結構

            <2025年7月>
            293012345
            6789101112
            13141516171819
            20212223242526
            272829303112
            3456789

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            CSDN - 我的blog地址

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久精品国产只有精品2020 | 国产99久久久国产精品~~牛| 午夜久久久久久禁播电影| 久久精品中文闷骚内射| 99久久精品国产高清一区二区| 精品国产乱码久久久久久浪潮| 久久天天躁夜夜躁狠狠| 97久久久久人妻精品专区 | 色噜噜狠狠先锋影音久久| 久久精品99无色码中文字幕| av色综合久久天堂av色综合在 | 久久午夜伦鲁片免费无码| 欧美久久综合性欧美| 亚洲AV无码久久精品成人| 久久久99精品成人片中文字幕| 亚洲精品蜜桃久久久久久| 久久久久久国产精品免费免费| 亚洲日韩中文无码久久| 人妻无码久久精品| 99久久精品国产一区二区蜜芽| 伊人久久大香线蕉av一区| 亚洲欧洲久久av| 四虎久久影院| 久久99精品久久久久久野外| .精品久久久麻豆国产精品| 久久99热这里只有精品国产| 精品久久久无码中文字幕天天| 精品国际久久久久999波多野| 久久久久女教师免费一区| 狠狠人妻久久久久久综合| 青草影院天堂男人久久| 99999久久久久久亚洲| 99久久人妻无码精品系列| 国产精品免费福利久久| 久久综合给合久久国产免费| 99久久国产精品免费一区二区| 色8激情欧美成人久久综合电| 久久夜色精品国产www| 伊人久久大香线蕉综合5g| 精品无码久久久久国产动漫3d| 久久综合色老色|