zoukankan      html  css  js  c++  java
  • 10420 List of Conquests

    C++语言: Codee#25825
    01 /*
    02 +++++++++++++++++++++++++++++++++++++++
    03                 author: chm
    04 +++++++++++++++++++++++++++++++++++++++
    05 */
    06
    07 #include <map>
    08 #include <set>
    09 #include <list>
    10 #include <queue>
    11 #include <cmath>
    12 #include <stack>
    13 #include <bitset>
    14 #include <cstdio>
    15 #include <cctype>
    16 #include <string>
    17 #include <vector>
    18 #include <cassert>
    19 #include <cstdlib>
    20 #include <cstring>
    21 #include <fstream>
    22 #include <sstream>
    23 #include <iomanip>
    24 #include <iostream>
    25 #include <algorithm>
    26
    27 using namespace std;
    28
    29 FILE*            fin         = stdin;
    30 FILE*            fout         = stdout;
    31 const int        max_size     = 10086;
    32 char line[max_size];
    33 map<string, int> country;
    34 int main()
    35 {
    36
    37     int n;
    38     char tmp[99];
    39     char ch;
    40     cin>>n;
    41     cin.get();
    42     while(n--)
    43     {
    44         cin.getline(line, sizeof(line));
    45         sscanf(line, "%s", tmp);
    46         string str(tmp);
    47         ++country[str];
    48     }
    49     for(map<string, int>::iterator it = country.begin(), itend = country.end();
    50             it != itend; ++it)
    51         cout << it->first << " " << it->second << endl;
    52     return 0;
    53 }
  • 相关阅读:
    TCP拥塞控制机制
    C/S 与 B/S 区别
    ext4文件系统新特性
    关于TCP慢启动和拥塞避免的题
    [信息图表]移动学习 Go Study
    [时间线]Android市场的发展
    学习,只有勤奋是不够的……
    UNIX域套接字实例
    程序员的本质
    淘宝Web服务器Tengine正式开源
  • 原文地址:https://www.cnblogs.com/invisible/p/2397512.html
Copyright © 2011-2022 走看看