简介

简单

code

#include <iostream>
#include <string>
#include <map>
using namespace std;

int main() {
    string s;
    
    while(cin >> s) {
        map<char, int> m;
        for(auto it : s) {
            m[it]++;
        }
        int min = 1000000;
        for(auto it : m){
            if(it.second < min) {
                min = it.second;
            }
        }
        string out;
        for(auto it : s) {
            if(m[it] == min) {
                
            }else{
                out+=it;
            }
        }
        cout << out <<endl;
    }
}
posted on 2021-06-25 10:24  HDU李少帅  阅读(36)  评论(0编辑  收藏  举报