• <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年9月>
            2930311234
            567891011
            12131415161718
            19202122232425
            262728293012
            3456789

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            CSDN - 我的blog地址

            博客

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            97视频久久久| 一本大道加勒比久久综合| 欧美国产成人久久精品| 无码人妻少妇久久中文字幕 | 97久久超碰国产精品旧版| 人人狠狠综合久久亚洲高清| 亚洲精品无码久久久久AV麻豆| 久久这里只精品99re66| 亚洲AV无码成人网站久久精品大| 少妇精品久久久一区二区三区| 日韩精品无码久久久久久| 丰满少妇高潮惨叫久久久| 亚洲人成无码www久久久 | 99久久免费国产特黄| 色综合久久天天综合| 久久久噜噜噜久久中文字幕色伊伊| 26uuu久久五月天| 一本色道久久综合亚洲精品| 伊人久久精品线影院| 久久天天躁狠狠躁夜夜躁2O2O| 97精品国产97久久久久久免费| 亚洲综合久久久| 成人午夜精品久久久久久久小说| 亚洲乱码中文字幕久久孕妇黑人 | 国产精品久久网| 热RE99久久精品国产66热| 国产精品久久精品| 99久久国产精品免费一区二区| 久久中文字幕一区二区| 亚洲国产精品无码久久98| 久久久久亚洲精品天堂久久久久久| 久久精品国产精品亚洲精品| 欧美一区二区三区久久综合| 久久久久久A亚洲欧洲AV冫| 国产成人香蕉久久久久| 久久免费视频观看| 久久精品草草草| 狠狠久久综合伊人不卡| 一本久久久久久久| 久久国产免费直播| 久久久久亚洲?V成人无码|