• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            f(sixleaves) = sixleaves

            重劍無鋒 大巧不工

              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
              95 隨筆 :: 0 文章 :: 7 評論 :: 0 Trackbacks
             1 #include <iostream>
             2 #include <string>
             3 #include <algorithm>
             4 #include <map>
             5 #include <vector>
             6 using namespace std;
             7 
             8 map<stringint> cnt;
             9 vector<string> words;
            10 
            11 string formatWord(const string &s);
            12 
            13 int main() {
            14     
            15     string s;
            16     while(cin >> s) {
            17         
            18         if (s[0] == '#') break;
            19         words.push_back(s);
            20         
            21         string fw = formatWord(s);
            22         if (!cnt.count(fw)) cnt[fw] = 0;
            23         cnt[fw]++;
            24     }
            25     
            26     vector<string> ans;
            27     for (int i = 0; i < words.size(); i++) {
            28         
            29         if ( cnt[formatWord( words[i] ) ] == 1) ans.push_back(words[i]);
            30     }
            31     
            32     sort(ans.begin(), ans.end());
            33     for (int i = 0; i < ans.size(); i++) {
            34         cout << ans[i] << endl;
            35     }
            36     return 0;
            37 }
            38 
            39 string formatWord(const string &s) {
            40     
            41     string ans = s;
            42     int str_size = ans.size();
            43     for (int i = 0; i <str_size; i++) {
            44         
            45         ans[i] = tolower(ans[i]);
            46         
            47     }
            48     sort(ans.begin(), ans.end());
            49     return ans;
            50 
            51 }
            posted on 2015-03-24 17:13 swp 閱讀(159) 評論(0)  編輯 收藏 引用 所屬分類: algorithm
            97久久国产亚洲精品超碰热| 亚洲国产成人久久综合野外| 无码国内精品久久综合88| 久久久午夜精品福利内容| 久久精品一本到99热免费| 精品国产乱码久久久久久1区2区| 久久亚洲精品人成综合网| 成人精品一区二区久久| 久久婷婷五月综合色奶水99啪| 99久久成人国产精品免费| 国产精品狼人久久久久影院| 久久精品综合网| 91精品国产91久久久久久蜜臀| 久久久久亚洲AV成人网| 亚洲中文字幕久久精品无码APP | 久久久久亚洲av成人网人人软件 | 精品久久无码中文字幕| 久久国产成人午夜aⅴ影院 | 欧美与黑人午夜性猛交久久久| 亚洲国产精品一区二区久久hs | 国产高清美女一级a毛片久久w| 久久久国产亚洲精品| 久久国产精品一区| 久久精品无码一区二区三区| 国产A级毛片久久久精品毛片| 精品无码久久久久久国产| 国内精品久久久久影院日本| 久久久国产亚洲精品| 久久青青草原精品国产软件| 国产—久久香蕉国产线看观看 | 亚洲精品视频久久久| 国产69精品久久久久9999| 久久久噜噜噜www成人网| 久久人爽人人爽人人片AV| 久久精品国产亚洲AV影院| 国内精品久久久久影院老司| 久久久久综合中文字幕| 久久精品人妻一区二区三区| 精品久久久久久久久久中文字幕| 热99re久久国超精品首页| 狠狠色噜噜狠狠狠狠狠色综合久久|