#1059
Unrated
KEKS
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Author: Ivan Katanić

Mirko and Slavko are bored at math class again so they came up with new game. Mirko writes down an N digit number, and Slavko’s task is to obtain the largest possible number after having removed exactly K digits. Help him do that!

입력

The first line of input contains integers N and K (1 ≤ K < N ≤ 500 000). The following line contains N digit number. This number starts with non-zero digit.

출력

The first and only line of output should contain the largest possible number Slavko can obtain by removing K digits from the given number.

예제 입력 1

4 2
1924

예제 출력 1

94

예제 입력 2

7 3
1231234

예제 출력 2

3234

예제 입력 3

10 4
4177252841

예제 출력 3

775841
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.