• <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 閱讀(543) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:字符串處理題目分類:排序
            久久九九免费高清视频| 色婷婷综合久久久久中文一区二区 | 亚洲中文字幕无码久久2020| 亚洲国产欧美国产综合久久| 久久亚洲国产午夜精品理论片| 国产一区二区精品久久凹凸 | 93精91精品国产综合久久香蕉| 国产福利电影一区二区三区久久老子无码午夜伦不 | 久久se精品一区二区| 久久男人中文字幕资源站| 一本色道久久88精品综合| 大美女久久久久久j久久| 99久久综合国产精品免费| 久久久久久狠狠丁香| 久久天天躁狠狠躁夜夜不卡| 婷婷久久综合九色综合98| 久久久久人妻一区二区三区| 97超级碰碰碰碰久久久久| 久久婷婷五月综合97色一本一本| 久久久精品人妻无码专区不卡| 精品国产一区二区三区久久久狼 | 无码人妻久久一区二区三区免费丨| 99热都是精品久久久久久| 丰满少妇人妻久久久久久| 国产精品久久久久久久久久影院| 精品欧美一区二区三区久久久 | 久久国产精品国语对白| 欧美777精品久久久久网| 精品久久久久久无码中文字幕一区| 久久亚洲AV成人无码软件| 久久久免费观成人影院| 久久香蕉国产线看观看猫咪?v| 久久青青草原国产精品免费| 久久国产精品-国产精品| 国产精品99久久精品| 精品国产一区二区三区久久| 精品久久久久久无码专区不卡| 久久国产热精品波多野结衣AV| 性色欲网站人妻丰满中文久久不卡| 亚洲欧美伊人久久综合一区二区| 久久久国产亚洲精品|