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

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久青青草原亚洲av无码app| 精品国产一区二区三区久久久狼 | 久久99国产综合精品| 怡红院日本一道日本久久 | 久久亚洲国产精品一区二区| 久久精品人人做人人妻人人玩| 国产精品国色综合久久| 久久亚洲国产精品一区二区| 久久综合九色欧美综合狠狠| 一级做a爰片久久毛片看看| 亚洲精品国精品久久99热一| 国产成人久久777777| 久久久SS麻豆欧美国产日韩| 久久A级毛片免费观看| 蜜桃麻豆www久久国产精品| 人妻精品久久久久中文字幕69| 亚洲国产成人久久综合碰碰动漫3d | 国产精品久久国产精麻豆99网站| 久久精品免费大片国产大片| 国产亚洲美女精品久久久2020| 久久777国产线看观看精品| 久久亚洲天堂| 青青草原综合久久大伊人精品| 久久久亚洲AV波多野结衣| 91精品国产色综久久| 欧洲精品久久久av无码电影| 久久国产精品视频| av午夜福利一片免费看久久| 中文字幕无码av激情不卡久久| 精品熟女少妇av免费久久| 伊人伊成久久人综合网777| 亚洲午夜久久影院| 久久精品麻豆日日躁夜夜躁| 久久久久久久综合狠狠综合| 国产视频久久| 久久青青草原综合伊人| 久久国产亚洲高清观看| 久久婷婷五月综合97色直播| 久久伊人精品青青草原日本| 国产精品免费看久久久香蕉| 情人伊人久久综合亚洲|