• <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 閱讀(537) 評論(0)  編輯 收藏 引用 所屬分類: 題目分類:字符串處理題目分類:排序
            久久这里都是精品| 国产精品免费久久久久久久久 | 亚洲中文久久精品无码ww16| 无码国内精品久久人妻麻豆按摩| 久久久久综合国产欧美一区二区 | 精品熟女少妇a∨免费久久| 国产精品久久一区二区三区| 久久久精品人妻无码专区不卡| 久久午夜免费视频| 色综合久久中文综合网| 2021国产精品午夜久久| 国产叼嘿久久精品久久| 天堂久久天堂AV色综合| 久久99精品久久久久久9蜜桃| 午夜不卡久久精品无码免费| 国产成人精品久久一区二区三区av| 91麻豆国产精品91久久久| 天天久久狠狠色综合| 久久国产免费直播| 欧美久久久久久午夜精品| 亚洲成色999久久网站| 亚洲av伊人久久综合密臀性色| 国产女人aaa级久久久级| 久久午夜伦鲁片免费无码| 欧美伊人久久大香线蕉综合69| 99久久亚洲综合精品成人| 国产精品免费看久久久| 久久免费的精品国产V∧| 一本一本久久A久久综合精品 | 久久综合中文字幕| 久久精品国产清高在天天线| 中文无码久久精品| 国产69精品久久久久观看软件| 亚洲精品久久久www| 久久亚洲AV永久无码精品| 久久久WWW成人| 久久毛片免费看一区二区三区| 久久精品国产99久久久香蕉| 国产免费福利体检区久久| 久久久久亚洲AV成人网人人网站 | 久久这里有精品|