字符串
The contest is ended. New submissions will be treated as correction submissions and will not be counted in the contest.
题目描述
给定一个长度为 且只包含小写字母的字符串 ,和 个小写字母 。现在你要把 个小写字母全部插入到字符串 中,每个小写字母都可以插入到任意位置。
请问能得到的字典序最小的字符串是什么?
输入格式
第一行包含两个整数 和 。
第二行包含一个长度为 的字符串 。 第三行包含 个小写字母 。
输出格式
输出一个长度为 的字符串代表答案。
4 3
abbc
cba
aabbbcc
7 3
lanqiao
bei
beilanqiao
提示
对于 的数据,。
京公网安备 11011102002149号