• <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 閱讀(172) 評論(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;

              }


             

            }

            青青草国产97免久久费观看| 一本久久综合亚洲鲁鲁五月天| 久久精品国产亚洲AV不卡| 日韩久久久久中文字幕人妻 | 99久久精品免费观看国产| 国产香蕉97碰碰久久人人| 日韩欧美亚洲国产精品字幕久久久| 中文字幕久久精品无码| 香蕉久久夜色精品国产小说| 久久久久99这里有精品10 | 国产精品99久久久久久www| 伊人情人综合成人久久网小说| 欧美大香线蕉线伊人久久| 国产精品亚洲美女久久久| 色婷婷综合久久久久中文一区二区| 精品久久久久久无码免费| 久久中文骚妇内射| 欧美一区二区久久精品| 99久久精品费精品国产| 国内精品人妻无码久久久影院 | 好久久免费视频高清| 思思久久99热只有频精品66| 99久久免费只有精品国产| 欧美亚洲色综久久精品国产| 一本大道久久东京热无码AV| 久久成人精品| 亚洲国产成人久久综合碰碰动漫3d| 性欧美丰满熟妇XXXX性久久久| 久久天天日天天操综合伊人av| 一本大道加勒比久久综合| 久久婷婷五月综合97色一本一本| 久久久久亚洲AV片无码下载蜜桃| 色综合久久中文字幕综合网| 免费一级做a爰片久久毛片潮| 国产综合精品久久亚洲| 久久精品国产精品亚洲下载| 91久久精品无码一区二区毛片| 国产巨作麻豆欧美亚洲综合久久| 国产ww久久久久久久久久| 久久精品国产72国产精福利| 久久精品国产一区二区|