• <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;

              }


             

            }

            欧美激情一区二区久久久| 国产精品免费久久久久影院| 99久久精品免费观看国产| 乱亲女H秽乱长久久久| 欧洲精品久久久av无码电影| 亚洲va久久久噜噜噜久久天堂 | 久久精品人妻中文系列| 欧美与黑人午夜性猛交久久久| 久久91精品综合国产首页| 2021国产成人精品久久| 久久AAAA片一区二区| 日韩一区二区三区视频久久| 一本久久免费视频| 国产精品久久久久久久人人看| 偷窥少妇久久久久久久久| 亚洲中文字幕无码一久久区| 日产精品久久久一区二区| 好久久免费视频高清| 国产综合久久久久久鬼色| 国产成人精品久久二区二区| 国产精品成人99久久久久91gav| 亚洲国产成人久久综合区| 久久妇女高潮几次MBA| 久久99热只有频精品8| 93精91精品国产综合久久香蕉| 久久国产精品无码网站| 伊人久久大香线蕉亚洲| 国产精品青草久久久久婷婷| 日韩精品无码久久一区二区三| 久久久久精品国产亚洲AV无码| aaa级精品久久久国产片| 久久精品国产99久久香蕉| 亚洲精品乱码久久久久久蜜桃不卡 | 少妇久久久久久被弄高潮| 麻豆精品久久久一区二区| 亚洲国产视频久久| 久久综合综合久久狠狠狠97色88| 人妻少妇精品久久| 久久96国产精品久久久| 久久精品无码一区二区WWW| 久久噜噜久久久精品66|