A11769. Alphabetic Removals
编程题
普及/提高-
知识点
题目描述
The first line of input contains two integers $n$ and $k$ ( $1 \le k \le n \le 4 \cdot 10^5$ ) — the length of the string and the number of letters Polycarp will remove.
The second line contains the string $s$ consisting of $n$ lowercase Latin letters.
The second line contains the string $s$ consisting of $n$ lowercase Latin letters.
输入格式
Print the string that will be obtained from $s$ after Polycarp removes exactly $k$ letters using the above algorithm $k$ times.
If the resulting string is empty, print nothing. It is allowed to print nothing or an empty line (line break).
If the resulting string is empty, print nothing. It is allowed to print nothing or an empty line (line break).
输出格式
无
输入输出样例
输入 #1
15 3 cccaabababaccbc
输出 #1
cccbbabaccbc
输入 #2
15 9 cccaabababaccbc
输出 #2
cccccc
输入 #3
1 1 u
输出 #3