You are given a string ss consisting of nn lowercase Latin letters. Polycarp wants to remove exactly kkcharacters (k≤nk≤n) from the string ss. Polycarp uses the following algorithm kk times:

  • if there is at least one letter 'a', remove the leftmost occurrence and stop the algorithm, otherwise go to next item;
  • if there is at least one letter 'b', remove the leftmost occurrence and stop the algorithm, otherwise go to next item;
  • ...
  • remove the leftmost occurrence of the letter 'z' and stop the algorithm.

This algorithm removes a single letter from the string. Polycarp performs this algorithm exactly kk times, thus removing exactly kk characters.

Help Polycarp find the resulting string.

Input

The first line of input contains two integers nn and kk (1≤k≤n≤4⋅1051≤k≤n≤4⋅105) — 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.

Output

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).

Examples

Input
15 3
cccaabababaccbc
Output
cccbbabaccbc
Input
15 9
cccaabababaccbc
Output
cccccc
Input
1 1
u
Output

删字母

自认为代码写的还算优美(嘻嘻)

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<deque>
#include<iostream>
using namespace std;
char con[];
int check[];
int main()
{
int i,p,j;
int n,k;
scanf("%d%d",&n,&k);
getchar();
for(i=;i<n;i++)
{
scanf("%c",&con[i]);
check[con[i]]++;
}
con[i]=; for(i='a';i<='z'+;i++)
{
if(k<=)
break;
if(k-check[i]>=)
k-=check[i];
else
{
check[i]=k;
k=;
}
}
for(;i<='z';i++)
check[i]=; for(i=;i<n;i++)
{
if(check[con[i]]>)
{
check[con[i]]--;
}
else
printf("%c",con[i]);
}
putchar('\n'); return ;
}

最新文章

  1. 一行代码,让你的应用中UIScrollView的滑动与侧滑返回并存
  2. ant学习
  3. android之电话拨号器
  4. Jmeter上传文件
  5. Chorme dev tools小技巧
  6. 机器学习 —— 概率图模型(Homework: CRF Learning)
  7. 进入GRUB改root用户密码
  8. HTTP层 —— 中间件
  9. iOS网络层架构设计分享
  10. 【7】用Laravel5.1开发一个简单的博客系统
  11. 变形课hd1181(DFS)
  12. Bootstrap学习 - 全局CSS样式
  13. 解决xtrabackup command not found no mysqld group 问题
  14. Python学习笔记之基本语法学习1
  15. 利用Spring的ApplicationEvent执行自定义方法
  16. Bzoj1901 Dynamic Ranking
  17. 金山WPS一面
  18. 010 Editor v8.0.1(32 - bit) 算法逆向分析、注册机编写
  19. hive -e执行出现「cannot recognize input near &#39;&lt;EOF&gt;&#39; in select clause」问题
  20. Matlab:椭圆方程的导数边值问题

热门文章

  1. 如何在Eclipse配置PyDev插件
  2. python之enumerate()学习
  3. python while 学习
  4. 第201天:js---实现继承的5种方式
  5. python的N个小功能(高斯模糊原理及实践)
  6. BZOJ 2039 人员雇佣(最小割)
  7. Nowcoder 练习赛 23 D Where are you 解题报告
  8. Linux内核分析3
  9. spark streaming (一)
  10. Codeforces 578B. &quot;Or&quot; Game(思维题)