CF999C.Alphabetic Removals

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

The first line of input contains two integers nn and kk ( 1kn41051 \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 ss consisting of nn lowercase Latin letters.

输入格式

Print the string that will be obtained from ss after Polycarp removes exactly kk letters using the above algorithm kk times.

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

首页