作者:
sixB (6B)
2024-12-17 17:45:592182.
照字典序重新排
不能重複超過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