app开发者平台在数字化时代的重要性与发展趋势解析
808
2022-08-26
POJ 2629:Common permutation
Common permutation
Time Limit: 1000MS | | Memory Limit: 65536K |
Total Submissions: 5510 | | Accepted: 1681 |
Description
Given two strings of lowercase letters, a and b, print the longest string x of lowercase 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
Input consists of pairs of lines. The first line of a pair contains a and the second contains b. Each string is on a separate line and consists of at most 1,000 lowercase letters.
Output
For each subsequent pair of input lines, 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
Source
The UofA Local 1999.10.16
你 离 开 了 , 我 的 世 界 里 只 剩 下 雨 。 。 。
#include
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~