通过本文主要向大家介绍了华为防火墙配置实例,华为ospf配置实例,华为s5700配置实例,华为dhcp配置实例,华为acl配置实例等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
输入n个单词,统计各个单词出现的个数
#include <iostream> #include <map> #include <string> using namespace std; int main() { map<string,int> k; string word; while(cin>>word) ++k[word]; for(map<string,int>::iterator i=k.begin();i!=k.end();i++) cout<<(*i).first<<"\t"<<(*i).second<<endl; return 0; }</div>
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
</div>