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

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            人妻丰满?V无码久久不卡| 久久人人爽人人爽人人片AV不| 国产色综合久久无码有码| 久久婷婷五月综合97色| 久久发布国产伦子伦精品| 性高朝久久久久久久久久| 麻豆精品久久久久久久99蜜桃| 精品乱码久久久久久久| 久久久久人妻一区精品果冻| 久久久亚洲欧洲日产国码aⅴ | 久久亚洲AV成人出白浆无码国产 | 国内精品久久久久久中文字幕 | 久久亚洲精品无码播放| 99久久无码一区人妻| 国产精品久久久久久吹潮| 91精品观看91久久久久久| yy6080久久| 久久av免费天堂小草播放| 久久婷婷五月综合色高清| 久久av免费天堂小草播放| 久久久久99精品成人片欧美| 欧美一级久久久久久久大| 久久66热人妻偷产精品9| 区久久AAA片69亚洲| 精品无码人妻久久久久久| 99久久免费国产精精品| 久久精品国产69国产精品亚洲| 国产成人无码久久久精品一| 午夜精品久久久久成人| 日本久久久久久中文字幕| 久久精品无码专区免费| 99国产精品久久久久久久成人热| 久久久久久久女国产乱让韩| 亚洲va国产va天堂va久久| 久久久噜噜噜www成人网| 久久精品国产亚洲AV蜜臀色欲 | 国产综合精品久久亚洲| 久久―日本道色综合久久| 国产精品久久久久影视不卡| 精品国产乱码久久久久久郑州公司| 日韩精品久久久久久免费|