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

            ACM___________________________

            ______________白白の屋
            posts - 182, comments - 102, trackbacks - 0, articles - 0
            <2010年8月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            常用鏈接

            留言簿(24)

            隨筆分類(lèi)(332)

            隨筆檔案(182)

            FRIENDS

            搜索

            積分與排名

            最新隨筆

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            //MiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(zhuǎn)載自 ______________白白の屋

            題目地址 :
                  http://acm.hdu.edu.cn/showproblem.php?pid=2672

            好吧..............我承認(rèn), 當(dāng)我看這題的解題報(bào)告時(shí),  我被征服了................
            代碼如下:
            //MiYu原創(chuàng), 轉(zhuǎn)帖請(qǐng)注明 : 轉(zhuǎn)載自 ______________白白の屋

            #include <iostream>
            #include 
            <string>
            #include 
            <cctype>
            using namespace std;
            int a[1001= 011 };
            int main ()
            {
                
            // 第N個(gè)字母對(duì)應(yīng) 第N個(gè)FIBONACI數(shù)列的第N項(xiàng) ,當(dāng)然,這是字母,要取模 
                for ( int i = 2; i < 1001++ i )
                
            {
                      a[i] 
            = ( a[i - 1+ a[i - 2] ) % 26;     
                }

                
            string str;  
                
            while ( getline ( cin , str ) )
                
            {
                        
            int num = 0;
                        
            for ( int i = 0; str[i]; ++i )
                        
            {
                              
            //對(duì)每個(gè)A-Z字符進(jìn)行處理 
                              if ( isupper ( str[i] ) )
                              
            {
                                   num 
            ++;
                                   printf ( 
            "%c", isupper ( str[i] + a[num] ) ? str[i] + a[num] : str[i] + a[num] - 26 );
                              }
             
                              
            else 
                              
            {
                                   printf ( 
            "%c", str[i] );
                              }

                        }

                        printf(
            "\n");
                }

                
            return 0;
            }

            少妇精品久久久一区二区三区| 久久精品国产影库免费看 | 亚洲精品乱码久久久久久中文字幕 | 精品免费久久久久国产一区| 久久亚洲AV无码西西人体| 久久久久亚洲AV片无码下载蜜桃| 久久亚洲精品国产精品| 精品久久人人爽天天玩人人妻| 波多野结衣AV无码久久一区| 亚洲国产精品久久| 亚洲欧美日韩中文久久| 国产精品午夜久久| 久久香蕉国产线看观看精品yw| 99久久国产综合精品成人影院| 精品国产99久久久久久麻豆| 久久精品国产色蜜蜜麻豆| 精品久久久久久国产潘金莲| 国内精品久久久久影院老司| 91精品国产色综久久| 久久夜色精品国产网站| 伊人久久无码精品中文字幕| 久久99国产一区二区三区| 久久精品无码专区免费青青| 亚洲精品无码久久久| 久久精品国产国产精品四凭| 精品久久一区二区| 久久九九精品99国产精品| 亚洲色大成网站www久久九| 久久久综合香蕉尹人综合网| 一级做a爱片久久毛片| 天天综合久久久网| 久久精品一区二区| a高清免费毛片久久| 精品久久久无码人妻中文字幕豆芽| 亚洲人成电影网站久久| 久久精品人人做人人爽电影| 久久精品国产色蜜蜜麻豆| 久久久久久精品成人免费图片 | 久久人人爽人人爽人人爽 | 精品国产一区二区三区久久| 国产99精品久久|