_ _ 请各位大佬帮帮me,也是醉了 _ _
#include<bits/stdc++.h>
using namespace std;
string a;
long long k,num[255],ans;
int main(){
cin>>a>>k;
long long kk = k;
long long n = a.length();
for(int i = 1;i <= n;++i){
num[i] = a[i-1] - '0';
}
for(int i = 0;i < n;i++){
if(k == 0){
break;
}
if(a[i] > a[i+1]){
for(int j = i;j <= n;j++){
a[j] = a[j+1];
}
if(a[i] > a[i+1]) i--;
k--;
}
}
for(int i = 0;i < n-kk;i++){
cout<<a[i];
}
return 0;
}
30分求调,本地样例过了,样例3,7过了
代码可能不是很好,勿喷