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

            學習心得(code)

            superlong@CoreCoder

              C++博客 :: 首頁 :: 聯系 :: 聚合  :: 管理
              74 Posts :: 0 Stories :: 5 Comments :: 0 Trackbacks

            公告

            文字可能放在http://blog.csdn.net/superlong100,此處存放代碼

            常用鏈接

            留言簿(4)

            我參與的團隊

            搜索

            •  

            最新隨筆

            最新評論

            • 1.?re: Poj 1279
            • 對于一個凹多邊形用叉積計算面積 后能根據結果的正負來判斷給的點集的時針方向?
            • --bsshanghai
            • 2.?re: Poj 3691
            • 你寫的這個get_fail() 好像并是真正的get_fail,也是說fail指向的串并不是當前結點的子串。為什么要這樣弄呢?
            • --acmer1183
            • 3.?re: HDU2295[未登錄]
            • 這個是IDA* 也就是迭代加深@ylfdrib
            • --superlong
            • 4.?re: HDU2295
            • 評論內容較長,點擊標題查看
            • --ylfdrib
            • 5.?re: HOJ 11482
            • 呵呵..把代碼發在這里很不錯..以后我也試試...百度的編輯器太爛了....
            • --csuft1

            閱讀排行榜

            評論排行榜

            # include <stdio.h>
            # include 
            <string.h>

            int n, h, t;
            char str[100005];

            int main() {
                
            while(scanf("%d"&n), n) {
                    scanf(
            "%s", str);
                    
            int sh = 0, h = 0, t = 0, st = 0, L = strlen(str);
                    
            for(int i = 0; i < L; i ++{
                        
            if(str[i] == 'H') h ++;
                        
            if(str[i] == 'T') t ++;
                    }

                    
            if( h % 2 || t % 2{
                        puts(
            "-1");
                        
            continue;
                    }

                    
            for(int i = 0; i < L / 2; i ++{
                        
            if(str[i] == 'H') sh ++;
                        
            if(str[i] == 'T') st ++;
                    }

                    
            int head = 0, tail = L / 2;
                    
            while(sh != h / 2{
                        
            if(str[head] == 'H') sh --;
                        
            if(str[head] == 'T') st --;
                        
            if(str[tail] == 'H') sh ++;
                        
            if(str[tail] == 'T') st ++;
                        head 
            ++; tail ++;
                    }

                    
            if(head != 0) printf("2\n%d ", head);
                    
            else printf("1\n");
                    printf(
            "%d\n", tail);
                }

            }

            posted on 2010-04-03 22:05 superlong 閱讀(386) 評論(0)  編輯 收藏 引用
            久久国产美女免费观看精品| 一本色道久久88精品综合| 久久婷婷综合中文字幕| 伊人久久综在合线亚洲2019| 蜜臀久久99精品久久久久久| 国产精品禁18久久久夂久| 久久99精品免费一区二区| 亚洲AV乱码久久精品蜜桃| 伊人久久免费视频| 精品久久久久久中文字幕大豆网| 日本一区精品久久久久影院| 国色天香久久久久久久小说| 国产—久久香蕉国产线看观看| 精品无码久久久久久午夜| 四虎国产精品免费久久| 26uuu久久五月天| 国产Av激情久久无码天堂| 色综合久久夜色精品国产| 激情久久久久久久久久| 99久久成人国产精品免费| 99蜜桃臀久久久欧美精品网站| 久久噜噜久久久精品66| 久久亚洲国产欧洲精品一| 久久精品无码一区二区无码| 久久久久久精品免费看SSS| 久久久久久亚洲精品不卡 | 香蕉久久夜色精品国产2020| 日韩一区二区久久久久久| 99久久免费国产特黄| 国产午夜免费高清久久影院| 久久午夜羞羞影院免费观看| 蜜臀av性久久久久蜜臀aⅴ麻豆| 伊人久久大香线蕉亚洲| 欧美日韩精品久久久久| 欧美激情一区二区久久久| 欧美久久久久久精选9999| 天天综合久久一二三区| 思思久久99热只有频精品66| 久久精品无码一区二区WWW| 久久婷婷五月综合97色| 久久精品成人免费网站|