• <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地址

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            A级毛片无码久久精品免费| 93精91精品国产综合久久香蕉| 久久国产乱子伦精品免费午夜| 久久久WWW成人免费毛片| 色狠狠久久综合网| 久久影院综合精品| 国内精品欧美久久精品| 少妇久久久久久被弄高潮| 99久久国产热无码精品免费久久久久| 看全色黄大色大片免费久久久| 亚洲国产欧美国产综合久久 | 久久精品视频网| 一本色道久久综合狠狠躁篇 | 四虎国产精品成人免费久久| 欧美噜噜久久久XXX| 久久无码精品一区二区三区| 狼狼综合久久久久综合网| 少妇被又大又粗又爽毛片久久黑人| 少妇久久久久久久久久| 亚洲欧美国产精品专区久久 | 国产情侣久久久久aⅴ免费| 久久久久国产精品嫩草影院 | 色婷婷狠狠久久综合五月| 97久久久久人妻精品专区| 久久精品国产日本波多野结衣| 久久久久久无码国产精品中文字幕| 青草国产精品久久久久久| 久久亚洲中文字幕精品一区| 久久国产精品一区| 国产成人久久精品二区三区| 久久久久一区二区三区| 色欲av伊人久久大香线蕉影院| 国产精品久久久久久久久软件| 久久久久亚洲精品无码网址| 91久久精品视频| 99久久国产热无码精品免费久久久久| 久久不见久久见免费视频7| 久久夜色精品国产噜噜亚洲AV| 日韩久久久久久中文人妻| 久久精品国产网红主播| 久久精品国产福利国产秒|