• <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 數據結構

            <2010年3月>
            28123456
            78910111213
            14151617181920
            21222324252627
            28293031123
            45678910

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            CSDN - 我的blog地址

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            激情综合色综合久久综合| 国产精品VIDEOSSEX久久发布 | 精品久久一区二区| 久久99国产精品99久久| 久久国产精品国产自线拍免费| 国产精品久久久久影院嫩草| 色综合久久天天综线观看| 无码国产69精品久久久久网站| 2020最新久久久视精品爱| 狠狠综合久久AV一区二区三区| 四虎国产永久免费久久| 亚洲午夜久久久久久久久久 | 久久精品一区二区国产| 国产精品伊人久久伊人电影| 一本一本久久a久久精品综合麻豆| 2021少妇久久久久久久久久| 久久夜色tv网站| 久久午夜夜伦鲁鲁片免费无码影视| 久久96国产精品久久久| 中文成人无码精品久久久不卡| 久久久久亚洲Av无码专| 欧美喷潮久久久XXXXx| 久久精品无码一区二区WWW| 一本久久a久久精品综合香蕉 | 国产Av激情久久无码天堂| 午夜精品久久久久久毛片| 一本色道久久88加勒比—综合| 亚洲香蕉网久久综合影视| 综合久久给合久久狠狠狠97色 | 亚洲午夜无码久久久久小说| 久久精品aⅴ无码中文字字幕不卡| 久久精品国产精品亚洲下载 | 国产精品一区二区久久| 亚洲AV伊人久久青青草原| 久久九九全国免费| 少妇久久久久久久久久| 久久久久青草线蕉综合超碰| 亚洲AV伊人久久青青草原| 老司机午夜网站国内精品久久久久久久久 | 亚洲精品高清一二区久久| 久久e热在这里只有国产中文精品99 |