• <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>
            心如止水
            Je n'ai pas le temps
            posts - 400,comments - 130,trackbacks - 0
            注意輸出空格時不能使用ends,否則會WA。就在我對這題感到無比絕望的時候,把ends改成" ",AC。
            用map<string,int>很輕松就可以完成該題。
            以下是我的代碼:
            #include<iostream>
            #include
            <string>
            #include
            <map>
            #include
            <algorithm>
            #include
            <cstdio>
            #include
            <cctype>
            using namespace std;
            const char kTable[]="2223334445556667777888999";

            int main()
            {
                
            /*
                freopen("data.in","r",stdin);
                freopen("data.out","w",stdout);
                //
            */

                
            int T;
                cin
            >>T;
                
            bool first_output(true);
                
            while(T--)
                {
                    
            int n;
                    cin
            >>n;
                    map
            <string,int> r;
                    
            for(int i=1;i<=n;i++)
                    {
                        
            string t;
                        cin
            >>t;
                        t.erase(remove(t.begin(),t.end(),
            '-'),t.end());
                        
            for(int j=0;j<t.size();j++)
                            
            if(!isdigit(t[j]))
                                t[j]
            =kTable[t[j]-'A'];
                        t.insert(
            3,"-");
                        r[t]
            ++;
                    }
                    
            if(first_output)
                        first_output
            =false;
                    
            else
                        cout
            <<endl;
                    
            bool found(false);
                    
            for(map<string,int>::iterator i=r.begin();i!=r.end();i++)
                        
            if(i->second>1)
                        {
                            cout
            <<i->first<<" "<<i->second<<endl;
                            found
            =true;
                        }
                    
            if(!found)
                        cout
            <<"No duplicates."<<endl;
                }

                
            return 0;
            }
            posted on 2011-04-11 23:53 lee1r 閱讀(556) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:字符串處理題目分類:排序
            久久播电影网| 亚洲狠狠婷婷综合久久蜜芽 | 亚洲日韩中文无码久久| 一级做a爰片久久毛片毛片| 精品久久久久久无码人妻热| 91精品国产高清久久久久久91| 国产精品99久久久久久人| 好久久免费视频高清| 久久天天婷婷五月俺也去| 精品国产乱码久久久久久1区2区| 99久久精品国产一区二区三区| 97精品国产97久久久久久免费| 久久伊人中文无码| 91精品无码久久久久久五月天| 久久97久久97精品免视看| 久久精品国产亚洲av麻豆小说| 亚洲国产天堂久久综合网站| 久久亚洲私人国产精品vA| 久久久精品人妻无码专区不卡 | 婷婷综合久久中文字幕蜜桃三电影| 99精品国产在热久久| 久久精品国产清自在天天线 | 亚洲va久久久噜噜噜久久天堂| 久久er国产精品免费观看8| 久久大香香蕉国产| 亚洲国产美女精品久久久久∴| 久久久久亚洲AV无码专区首JN | 久久亚洲美女精品国产精品| 久久久久亚洲av综合波多野结衣| 久久久久99精品成人片试看| 无码人妻久久一区二区三区免费丨 | 国产精品久久影院| 亚洲狠狠久久综合一区77777| 久久久久国产精品熟女影院| 2021少妇久久久久久久久久| 久久精品国产精品亚洲精品| 久久久久亚洲AV无码专区桃色| 亚洲Av无码国产情品久久| 亚洲精品无码久久久久久| 91精品国产色综久久 | 日本高清无卡码一区二区久久|