
哈罗大家好我又是那个牛奶小咖啡,我又来求助啦(虽然做不出这种题有点丢脸)(大号被禁了,只能用小号啦)
14分,除了第一个测试点剩下的全WA,QAQ
贴上我可读性很差并且臭臭的代码~
// #include <bits/stdc++.h>
#include <queue>
#include <stack>
#include <cmath>
#include <string>
#include <cstdio>
#include <iomanip>
#include <cstring>
#include <cstring>
#include <iostream>
#include <algorithm> // 美丽的头文件
using namespace std;
string n; // 处理的数
int k; // 删去的个数
int main() {
    cin >> n >> k; // 嗯输入
    int len = n.length(); // 求长度
    while (k--) {
        for (int i = 0; i < len - 1; i++)
            if (n[i] > n[i+1]) {
                for (int j = i; j <= len - 2; j++) n[j] = n[j+1]; // 嗯如果这个数比后面的那个数大就要删掉~
                // 只需要把后面的赋值给前面这个就删掉辣
                break;
            }
        len--; // 长度也要相应的--
    }
    int i = len - 2;
    while (i <= len - 1 && n[i] == '0') i++; // 有可能有前导零丫
    if (i == len) cout << 0; // 如果相等的话就不太正常
    else for (int j = n2; j <= len - 1;j++) cout << n[j]; // 不是的话就输出O
    cout << endl; // 好像没必要不过是我的习惯呢~
    return 0;
}