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

            <2011年5月>
            24252627282930
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            CSDN - 我的blog地址

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            一本大道久久香蕉成人网| 久久人人爽人人爽人人片AV东京热| 99久久无码一区人妻a黑| 亚洲乱亚洲乱淫久久| 日韩人妻无码一区二区三区久久99| 国产亚洲精久久久久久无码77777 国产亚洲精品久久久久秋霞 | 无码AV波多野结衣久久| 91精品国产9l久久久久| 中文精品久久久久国产网址| 欧美黑人激情性久久| 品成人欧美大片久久国产欧美| 要久久爱在线免费观看| 国产999精品久久久久久| 午夜精品久久久久久毛片| 欧美日韩精品久久久久| 国产精品久久网| 日韩人妻无码精品久久免费一| 四虎影视久久久免费观看| 久久亚洲综合色一区二区三区| 久久精品国产免费观看三人同眠| 99久久免费只有精品国产| 国产成人久久精品区一区二区| 午夜久久久久久禁播电影| 久久无码国产专区精品| 伊人久久大香线蕉成人| 理论片午午伦夜理片久久| 国产精品va久久久久久久| 日本一区精品久久久久影院| 久久国产欧美日韩精品| 日韩精品久久无码人妻中文字幕| 亚洲AV无码久久精品狠狠爱浪潮| 狠狠综合久久AV一区二区三区| 久久久久久久97| 久久天天躁狠狠躁夜夜网站| 熟妇人妻久久中文字幕| 久久夜色精品国产网站| 97精品国产91久久久久久| 久久精品国产精品青草app| 国产高潮国产高潮久久久91 | 国产精品久久久香蕉| 久久久久青草线蕉综合超碰|