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

              }


             

            }

            亚洲中文字幕无码久久2017 | 久久亚洲日韩精品一区二区三区| 国产激情久久久久影院老熟女| 日本精品久久久久中文字幕| 狠狠色伊人久久精品综合网| 久久亚洲日韩看片无码| 人妻丰满AV无码久久不卡| 国产精品久久久久久福利漫画 | 久久精品视屏| 伊人伊成久久人综合网777| 亚洲AV无码久久| 久久精品国产只有精品2020| 久久青青草视频| 亚洲AV无一区二区三区久久 | 国产精品9999久久久久| 久久国产视频99电影| 久久精品无码专区免费东京热 | 国产伊人久久| 国产精品无码久久综合| 亚洲精品国产综合久久一线| 久久国产一区二区| 一本一本久久a久久综合精品蜜桃| 99热精品久久只有精品| 国内精品久久久久影院优| 国产精品亚洲综合久久| 久久久WWW成人免费精品| 久久精品国产69国产精品亚洲| 伊人久久大香线蕉av不卡| 老司机午夜网站国内精品久久久久久久久 | 亚洲午夜久久影院| 久久精品中文騷妇女内射| 伊人久久精品影院| 亚洲午夜精品久久久久久浪潮| 久久综合综合久久狠狠狠97色88| 久久精品国产免费观看| 成人亚洲欧美久久久久| 99久久精品国产免看国产一区| 久久超乳爆乳中文字幕| 色诱久久久久综合网ywww| 亚洲精品无码久久久久去q| 久久婷婷五月综合国产尤物app|