Time Limit: 5000 MS Memory Limit: 65536 K
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.
coci 2011/2012 contest4