Re: [閒聊] 每日leetcode

作者: sixB (6B)   2024-12-17 17:45:59
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
作者: sustainer123 (caster)   2024-12-17 17:52:00
這題好麻煩
作者: oin1104 (是oin的說)   2024-12-17 18:14:00
今天超麻煩

Links booklink

Contact Us: admin [ a t ] ucptt.com