1812

    [골3] 2812 - 크게 만들기

    #include #include #include #include #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, k; string str; vector v; cin >> n >> k >> str; for (int i = 0; i 0 && !v.empty() && v.back() < str[i]) { v.pop_back(); k--; } v.push_back(str[i]); } while (k--) v.pop_back(); for (int i = 0; i < v.size(); i..