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
praveen123:
20130502 06:48:14
@Nnavneetsinha : You are not satisfying condition of deleting exactly k characters. Try some small test cases.


Nnavneetsinha:
20130502 06:48:14
Hey,can you check my code . Id is 8715716.Please provide a hint ,to find the bug. 

praveen123:
20130502 06:48:14
@ Gaurav : Try writing a brute force checker, You will surely find out your error. 

Gaurav:
20130502 06:48:14
@praveen123: I am getting WA though my code is satisfying given test cases and my test cases. Can you tell me what is wrong in my output? Code ID8721212 

Akhil Rao:
20130502 06:48:14
@praveen123 I was way off. Nice problem. Enjoyed it :) 

praveen123:
20130502 06:48:14
@abhinav : 33 , reread the problem statement.


:D:
20130502 06:48:14
You don't have to be tutored. Nobody expect fluent English here. Just don't break it on purpose with "wut", "wit" and the like. It just makes text hard to read, especially when it's on top of other language problems. I honestly don't know why so many people do that here. As for the English itself, start with enabling an automatic error checking in your browser. That's what I do. Last edit: 20130213 17:54:30 

:D:
20130502 06:48:14
Also Fringe, if you're going to make any request of any kind, use English not gibberish. 

Mitch Schwartz:
20130502 06:48:14
Finding bugs in your own code is part of the problem solving process.


Fringe:
20130502 06:48:14
i hate spoj.....if u don't know where is your mistake how wud u improve :/

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 