Larger Number
题号:NC207641
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Binbin has got a postive integer n (without leading zeroes). Now she wants it become larger. The only operation she can do is to swap two adjacent digits of the integer. Unfortunately, she can only do the operation k times at most. She wants to know the largest number she can get after at most k operations.

输入描述:

A single line contains two integers n,k (1<=n<=101000, 0<=k<=1000).

输出描述:

Print one integer in a single line, represents the largest number Binbin can get after at most k operations.
示例1

输入

复制
1205 2

输出

复制
2150