MAX_NUM  finding maximum possible number
Given a number n, Find out what max possible number you can make by deleting exactly k digits.
T : no of test cases <= 10^3
1 <= no of digits in n <= 10^5. (n might contain leading zeros)
0 <= k <= n
if value of n is equal to k. then just print a new line.
Input
T: no of test cases
T line follow
every line has
n , k
Output
max possible number
Example
Input:
2
1223 2
8756 2 Output: 23
87
Explanation:
Note that left to right order should be maintained. As in the example given answer is 23 not 32.
hide comments
Thotsaphon Thanatipanonda:
20130502 06:48:14
My Java program can run within 0.20 sec without any special optimization. 

Akb:
20130502 06:48:14
what to print if k=(no of digits in the number)??


:D:
20130502 06:48:14
The only real problem was that i/o was incorrect. You may change the time limit, so that JAVA could pass easier. 

praveen123:
20130502 06:48:14
I have updated the problem statement to make it more cleaner, I have also modified the test cases. Three solutions have been accepted.


praveen123:
20130502 06:48:14
hi all,


:D:
20130502 06:48:14
Re praveen123: Pretty much what Robert said. For test cases here my solutions coincide. Could you print some small case where any of us fails? 

Robert Gerbicz:
20130502 06:48:14
My code prints the same answers for that two input. But you can see our code as (here) you are the problem setter.


praveen123:
20130502 06:48:14
:D , you are printing out a huge streak of 9's as in the case of Robert.

Added by:  praveen123 
Date:  20130209 
Time limit:  0.407s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  general 