不成熟的代码,留给未来的自己,忘了回去再看一看,此代码含有可选泽屏蔽字
#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<iterator>
#include<set>
#include<map>
using namespace std;
int main(void) {
map<string, int>counts;
string str;
set < string >exclude= {"the","but","and"};
while (cin >> str) {
if(exclude.find(str)==exclude.end())
++counts[str];
}
for (auto w : counts) {
cout << w.first << " accue: " << w.second<<endl;
} 0;
}