• <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>
              C++博客 :: 首頁 :: 新隨筆 ::  ::  :: 管理

            pku1051

            Posted on 2010-08-19 01:45 Kevin_Zhang 閱讀(165) 評論(0)  編輯 收藏 引用 所屬分類: 模擬

             

            #include "iostream"

            #include 
            "string"

            #include 
            "ctype.h"

            #include 
            "algorithm"

            #include 
            "Map"

            using namespace std;

            char a[34][9]={".-","-","-.-.","-..",".","..-.","--.",".","..",".---","-.-",".-..",

            "--","-.","---",".--.","--.-",".-.","","-","..-","-",".--","-..-","-.--","--..","..--",".-.-","---.","----"}
            ;

            int b[34]={2,4,4,3,1,4,3,4,2,4,3,4,2,2,3,4,4,3,3,1,3,4,3,4,4,4,4,4,4,4};

            int main()

             

            {

              
            int m,n;

              
            int i;

              
            int count=0;

             

              
            int num[800],num2[800];

              
            char word[1900];

              
            char ch;

              map
            <stringchar> mapcode;

              
            for(i=0;i<26;i++)

              
            {

                  ch
            ='A'+i;

                     mapcode.insert(pair
            <stringchar>(a[i],ch));

              }


              ch
            ='_';

              mapcode.insert(pair
            <stringchar>(a[26],ch));

              ch
            =',';

              mapcode.insert(pair
            <stringchar>(a[27],ch));

                ch
            ='.';

              mapcode.insert(pair
            <stringchar>(a[28],ch));

                ch
            ='?';

              mapcode.insert(pair
            <stringchar>(a[29],ch));

              
            int nSize = mapcode.size();

              
            /*for(i= 0,ch='A'; i < nSize; i++)

              {

                       cout<<mapcode[a[i]]<<" "<<a[i]<<" "<<b[i]<<endl;

              }
            */


              cin
            >>n;

              

              getchar();

              
            while(n--)

              
            {

                     count
            ++;

              i
            =0;

              memset(num,
            0,sizeof(num));

              memset(num2,
            0,sizeof(num2));

              
            string temp("");

              
            while(1)

              
            {

                    

                     ch
            =getchar();

                     
            if(ch=='\n')  break;

                    

                      
            if(ch=='_')

                     
            {

                            temp
            =temp+a[26];

                            num[i]
            =b[26];

                     }


                      
            else  if(ch==',')

                     
            {

                            temp
            =temp+a[27];

                            num[i]
            =b[27];

                     }


                       
            else  if(ch=='.')

                     
            {

                            temp
            =temp+a[28];

                            num[i]
            =b[28];

                     }


                           
            else  if(ch=='?')

                     
            {

                            temp
            =temp+a[29];

                            num[i]
            =b[29];

                     }


                          
            else  if(isalpha(ch))

                     
            {temp=temp+a[ch-'A'];

                  num[i]
            =b[ch-'A'];}


                     i
            ++;

              }


              
            int len=i-1;

              
            for(i=0;i<=len;i++)

              
            {

                     num2[i]
            =num[len-i];

              }


             
            // cout<<num2<<endl;

              
            //cout<<temp<<endl;

              
            int k=0;

              cout
            <<count<<"";

                
            for(i= 0;i<=len; i++)

              
            {

                       cout
            <<mapcode[temp.substr(k,num2[i])];

                             k
            =k+num2[i];

              }


                   cout
            <<endl;

              }


             

            }

            国内精品久久久久久久coent| 精品99久久aaa一级毛片| 无码AV波多野结衣久久| 一本久久知道综合久久| 久久国产亚洲精品无码| 一本色道久久88加勒比—综合| 久久99热这里只有精品国产| 伊色综合久久之综合久久| 久久免费的精品国产V∧| 精品久久久久久国产| 午夜视频久久久久一区 | 日韩亚洲欧美久久久www综合网| 99久久精品国产一区二区| 久久精品无码一区二区日韩AV| 久久综合久久综合亚洲| 91精品国产91久久久久福利| 国产午夜精品久久久久九九电影 | 亚洲国产成人久久精品99 | 国产人久久人人人人爽| 久久99精品久久久久久秒播| 久久精品国产免费观看三人同眠| 国产一级做a爰片久久毛片| 欧美久久久久久| 亚洲精品高清久久| 看久久久久久a级毛片| 久久久免费观成人影院| 久久99精品久久久久久hb无码| 开心久久婷婷综合中文字幕| 久久久噜噜噜久久熟女AA片 | 手机看片久久高清国产日韩| 国产综合久久久久| 中文字幕久久久久人妻| 久久精品国产亚洲7777| 久久精品www| 亚洲国产精品无码久久久不卡| 久久久免费观成人影院| 四虎国产精品免费久久久| 午夜不卡久久精品无码免费| 亚洲国产精品综合久久网络| 99久久99久久精品国产| 久久99热狠狠色精品一区|