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

            隨筆分類(332)

            隨筆檔案(182)

            FRIENDS

            搜索

            積分與排名

            最新隨筆

            最新評論

            閱讀排行榜

            評論排行榜

            HDOJ HDU 2672 god is a girl ACM 2672 IN HDU

            Posted on 2010-08-04 12:47 MiYu 閱讀(347) 評論(0)  編輯 收藏 引用 所屬分類: ACM ( 串 )ACM ( 數論 )
            //MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

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

            好吧..............我承認, 當我看這題的解題報告時,  我被征服了................
            代碼如下:
            //MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋

            #include <iostream>
            #include 
            <string>
            #include 
            <cctype>
            using namespace std;
            int a[1001= 011 };
            int main ()
            {
                
            // 第N個字母對應 第N個FIBONACI數列的第N項 ,當然,這是字母,要取模 
                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 )
                        
            {
                              
            //對每個A-Z字符進行處理 
                              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;
            }

            热综合一本伊人久久精品| 欧美一级久久久久久久大片| 国产aⅴ激情无码久久| 久久婷婷色综合一区二区 | 久久婷婷成人综合色综合| 午夜天堂av天堂久久久| 亚洲成人精品久久| 久久国产色av免费看| 97久久精品国产精品青草| 麻豆久久| 99久久国产免费福利| 开心久久婷婷综合中文字幕| 亚洲AV无一区二区三区久久| 中文字幕一区二区三区久久网站| 婷婷久久五月天| 久久男人中文字幕资源站| 久久99精品久久只有精品| 午夜欧美精品久久久久久久| 国产欧美久久久精品| 久久人人爽人人爽人人片av高请| 久久国产一区二区| 日韩久久久久久中文人妻| 久久天天躁狠狠躁夜夜不卡| 国内精品久久久久久野外| 亚洲精品美女久久777777| 久久久国产视频| 久久国产影院| 欧美国产精品久久高清| 热久久这里只有精品| 久久亚洲精品视频| 国内精品久久久久久久97牛牛| 久久天天躁夜夜躁狠狠| 久久亚洲国产精品五月天婷| 色综合合久久天天综合绕视看| 狠狠色丁香久久婷婷综合五月| 亚洲中文久久精品无码ww16| 国产精品久久久香蕉| 久久精品毛片免费观看| 精品久久久久久亚洲精品 | 亚洲国产精品无码成人片久久| 亚洲人AV永久一区二区三区久久|