2182.
照字典序重新排
不能重复超过rp次
放好多flag有点丑
时拉比真的好强
吗的slot币池
我一整个tts了
class Solution {
public:
string repeatLimitedString(string s, int rp) {
vector<int> ch(26, 0);
for(char& c: s){
ch[c-'a']++;
}
string res;
while(true){
bool flag = true, pass = false;
for(int i = 25; i >= 0; i