• <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东京热| 97久久超碰成人精品网站| 99久久人妻无码精品系列| 国产精品岛国久久久久| 久久久久国产精品麻豆AR影院| 久久午夜综合久久| 亚洲国产精品无码久久一线 | 亚洲欧美日韩中文久久| 国产精品免费福利久久| 日日狠狠久久偷偷色综合0| 久久99亚洲网美利坚合众国| 久久精品免费大片国产大片| 国内精品久久久久影院日本 | 性高朝久久久久久久久久| 亚洲午夜久久久影院| 久久精品国产一区二区电影| 69国产成人综合久久精品| 国产精品久久久久久久久软件| 久久综合久久综合久久| 久久久久亚洲av无码专区| 日日狠狠久久偷偷色综合0| 国产成人精品久久一区二区三区av | 无码国内精品久久人妻| 一本色道久久88综合日韩精品| 99久久精品免费看国产| 久久精品免费观看| 久久se精品一区精品二区| 亚洲精品白浆高清久久久久久| 久久久久国产视频电影| 国产精品免费久久久久久久久 | 国产A级毛片久久久精品毛片| 久久久女人与动物群交毛片| 色老头网站久久网| 久久99热这里只频精品6| 日韩欧美亚洲综合久久| 中文字幕无码av激情不卡久久| 亚洲人成网站999久久久综合 | 久久人妻AV中文字幕| 亚洲中文字幕久久精品无码APP| 久久亚洲日韩看片无码|