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

            我希望你是我獨家記憶

            一段永遠封存的記憶,隨風而去
            posts - 263, comments - 31, trackbacks - 0, articles - 3
               :: 首頁 :: 新隨筆 ::  :: 聚合  :: 管理

            URAL_1612

            Posted on 2008-12-14 01:00 Hero 閱讀(145) 評論(0)  編輯 收藏 引用 所屬分類: 代碼如詩--ACM
             1 // 1612 C++ Accepted 0.031 129 KB URAL
             2 
             3 //簡單字符串處理--字符串分割
             4 //注意tram.tram這種情況
             5 
             6 #include <stdio.h>
             7 #include <stdlib.h>
             8 #include <string.h>
             9 
            10 int a, b ;
            11 char str[10010] ;
            12 char tstr[10010] ;
            13 
            14 int main()
            15 {
            16     int len ; a = 0 ; b = 0 ;
            17     while( scanf( "%s", str ) != EOF )
            18     {
            19         len = strlen( str ) ;
            20         forint i=0; i<len; i++ )
            21         {
            22             tstr[0= '\0' ; int tlen = 0 ;
            23             if( str[i]>='a' && str[i]<='z' )
            24             {
            25                 while( str[i]>='a' && str[i]<='z' )
            26                 {
            27                     tstr[tlen++= str[i++] ;
            28                 }
            29                 tstr[tlen++= '\0' ;
            30                 if( strcmp( tstr, "tram" ) == 0 ) a++ ;
            31                 if( strcmp( tstr, "trolleybus" ) == 0 ) b++ ;
            32             }
            33             else continue ;
            34         }
            35     }
            36 
            37     if( a > b ) printf( "Tram driver\n" ) ; 
            38     else if( a < b ) printf( "Trolleybus driver\n" ) ;
            39     else printf( "Bus driver\n" ) ;
            40 
            41     return 0 ;
            42 }
            日韩精品无码久久久久久| 99久久免费只有精品国产| 久久久久亚洲av综合波多野结衣| 久久人人添人人爽添人人片牛牛| 奇米影视7777久久精品| 国产精品免费看久久久香蕉| 久久久久国产一区二区| 久久综合狠狠综合久久综合88| 色偷偷888欧美精品久久久| 久久人人爽人人爽人人片AV不| 国产精品久久久久天天影视| 一级女性全黄久久生活片免费| 97精品伊人久久大香线蕉app| 亚洲а∨天堂久久精品9966| 91精品国产乱码久久久久久| 久久亚洲精品成人无码网站| 日韩亚洲欧美久久久www综合网 | 麻豆一区二区99久久久久| 狠狠人妻久久久久久综合| 亚洲精品白浆高清久久久久久 | 久久久久亚洲av无码专区| 久久这里有精品视频| 国产精品欧美久久久久天天影视| 久久久久亚洲AV无码专区体验| 国色天香久久久久久久小说| 亚洲精品97久久中文字幕无码| 国产99久久久国产精免费| 久久久久国产精品熟女影院| 精品熟女少妇AV免费久久| 亚洲人成网站999久久久综合| 亚洲成色999久久网站| 亚洲一区中文字幕久久| 久久精品中文字幕久久| 久久综合九色综合97_久久久| av国内精品久久久久影院| 97久久精品无码一区二区天美| 久久天天躁狠狠躁夜夜躁2O2O| 无码久久精品国产亚洲Av影片 | 日韩中文久久| 人妻无码久久精品| 久久久久久国产a免费观看黄色大片|