五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

???

2023-06-23 23:22 作者:furiousiTy  | 我要投稿

#include <iostream>

#include <stack>

#include <string>


std::string removeDuplicates(const std::string& input) {

? ? std::stack<char> stack;


? ? for (char c : input) {

? ? ? ? if (isdigit(c)) { // 判斷字符是否是數(shù)字

? ? ? ? ? ? if (stack.empty() || stack.top() != c) {

? ? ? ? ? ? ? ? stack.push(c);

? ? ? ? ? ? }

? ? ? ? }

? ? }


? ? std::string result;

? ? while (!stack.empty()) {

? ? ? ? result = stack.top() + result;

? ? ? ? stack.pop();

? ? }


? ? return result;

}


int main() {

? ? std::string input = "a1b22c333d4444e55555";

? ? std::string result = removeDuplicates(input);

? ? std::cout << "Original string: " << input << std::endl;

? ? std::cout << "String after removing duplicates: " << result << std::endl;


? ? return 0;

}


???的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國家法律
庆云县| 土默特右旗| 襄城县| 锦屏县| 牟定县| 虹口区| 桃园市| 柘荣县| 即墨市| 上杭县| 金山区| 张北县| 达日县| 镇平县| 苗栗县| 大庆市| 长葛市| 佛教| 林西县| 微博| 巧家县| 临武县| 浦东新区| 邯郸县| 凤翔县| 九龙坡区| 松滋市| 东海县| 屯门区| 蒙山县| 富裕县| 建水县| 延庆县| 茂名市| 娄烦县| 桑植县| 灵丘县| 浦县| 乐至县| 盱眙县| 海口市|