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

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            国产成人无码精品久久久性色| 久久久久高潮综合影院| 三级韩国一区久久二区综合| 2021国产精品午夜久久| 久久免费99精品国产自在现线| 久久综合综合久久综合| 激情久久久久久久久久| 2021久久国自产拍精品| 欧美黑人又粗又大久久久| 国产A三级久久精品| 四虎影视久久久免费| 久久久午夜精品| 精品久久亚洲中文无码| 亚洲精品无码久久久久去q| 国产精品久久波多野结衣| 99久久国产综合精品麻豆| 亚洲国产成人久久精品影视| 99久久精品国产一区二区蜜芽| 久久99国产亚洲高清观看首页| 国产精品日韩深夜福利久久| 国产精品久久久久久五月尺| 狠狠综合久久综合88亚洲| 日韩精品久久无码人妻中文字幕| 国产麻豆精品久久一二三| 国产精品美女久久久免费| 无码精品久久一区二区三区| 久久人人添人人爽添人人片牛牛| 久久精品国产亚洲av日韩 | 色综合久久久久网| 久久久久人妻精品一区三寸蜜桃| 久久久无码人妻精品无码| 亚洲狠狠久久综合一区77777| 久久久久久国产精品无码下载| 亚洲一级Av无码毛片久久精品| 亚洲国产精品久久66| 亚洲日本久久久午夜精品| 亚洲va久久久噜噜噜久久狠狠| 青草影院天堂男人久久| 亚洲午夜久久久久妓女影院 | 欧美无乱码久久久免费午夜一区二区三区中文字幕 | 人妻无码中文久久久久专区|