• [1595] Asd loves larger things

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Radical has a son whose name is Asd.Because Asd is stupid , Radical give him some tests to improve his son's IQ.
    Now,Asd has a positive integer N without leading zero.Asd loves big things,so he wants to make N larger.For more
    interesting,Asd only can only do is to swap two adjacent decimal digits of the integer.Can you beat Asd to get the
    maximum integer if you also only can make at most K swaps;
  • 输入
  • The single line contains two integers N and K( 1<=N<=10^18 , 0<=k<=100 )
  • 输出
  • Print the maximum integer that you can get if you makes at most K swaps.
  • 样例输入
  • 1034 2
    1234 5
  • 样例输出
  • 3104
    4312
  • 提示
  • 来源
  • Radical@NBUT
  • 操作

显示春菜