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
Akhil Rao:
20130502 06:48:14
@praveen123 unable to find why i'm getting WA again and again. please suggest what is wrong with my code. ID 8705244 

johri:
20130502 06:48:14
if u cud tell me that for 313 if k=1 33 is the right ans or 31..pls Last edit: 20130213 09:19:44 

praveen123:
20130502 06:48:14
@shiva bhalla , please try some more cases and test your algorithm , May be a brute force generator for testing might help. 

shiva_hellgeek:
20130502 06:48:14
@praveen123 unable to find why i'm getting WA again and again. please suggest what is wrong with my code. ID 8700260


praveen123:
20130502 06:48:14
@Meraj Ahmed read problem carefully 

Meraj Ahmed:
20130502 06:48:14
@praveen123: could you tell me where my solution is failing...it says wrong answer in judge 3. submission id: 8694915 

Ehor Nechiporenko:
20130502 06:48:14
@Tjandra, good job! Brilliant optimizing! 

praveen123:
20130502 06:48:14
@Tjandra Satria Gunawan , On your suggestion I have changed the judge and rejudged all the submissions. Now I also feel like that time limit is good enough for java users also.


(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20130502 06:48:14
Nice problem :D could you change the cluster to pyramid? I want to know my program running time more accurately..


praveen123:
20130502 06:48:14
@jab tak hai jaan:

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 