• <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
               :: 首頁 :: 新隨筆 ::  :: 聚合  :: 管理

            P1226

            Posted on 2008-09-06 19:11 Hero 閱讀(112) 評論(0)  編輯 收藏 引用 所屬分類: 代碼如詩--ACM
             1 //1226 Accepted 216K 16MS C++ 1202B PKU
             2 
             3 #include <stdio.h>
             4 #include <stdlib.h>
             5 #include <string.h>
             6 
             7 const int size = 200 ;
             8 char data[size][120] ;
             9 
            10 char stra[120] ;
            11 char strb[120] ;
            12 
            13 int innum ;
            14 int inn ;
            15 
            16 void input()
            17 {
            18     scanf( "%d"&inn ) ;
            19     forint i=1; i<=inn; i++ )
            20     {
            21         scanf( "%s", data[i] ) ;
            22     }
            23 }
            24 
            25 bool test()
            26 {
            27     forint i=2; i<=inn; i++ )
            28     {
            29         if( NULL==strstr(data[i], stra)&&NULL==strstr(data[i], strb) )    return false ;
            30     }
            31 
            32     return true ;
            33 }
            34 
            35 void process()
            36 {
            37     int len = strlen( data[1] ) ; int cstra, cstrb ; bool hasfind = false ;
            38 
            39     forint clen=len; clen>=0; clen-- )
            40     {
            41         forint sn=0; sn+clen<=len; sn++ )        
            42         {
            43             cstra = cstrb = 0 ;
            44             forint i=sn; i<sn+clen; i++ ) stra[cstra++= data[1][i] ;
            45             forint i=clen-1; i>=0; i-- )  strb[cstrb++= stra[i] ;
            46             //printf( "%s==%s\n", stra, strb ) ;
            47 
            48             stra[clen] = strb[clen] = '\0' ;
            49 
            50             if( test() ) 
            51             {
            52                 hasfind = true ; printf( "%d\n", clen ) ; break ;
            53             }
            54         }
            55         if( hasfind )    break ;
            56     }
            57 
            58     if!hasfind ) printf( "0\n" ) ;
            59 }
            60 
            61 int main()
            62 {
            63     while( scanf( "%d"&innum ) != EOF )
            64     {
            65         forint ct=1; ct<=innum; ct++ )
            66         {
            67             input() ;
            68 
            69             process() ;
            70 
            71             //output() ;
            72         }
            73     }
            74 
            75     return 0 ;
            76 }
            亚洲欧洲精品成人久久曰影片| 91精品国产综合久久精品| 亚洲AV无码久久| 国产精品99久久免费观看| 国产99久久九九精品无码| 久久成人小视频| 国产精品久久永久免费| 天堂无码久久综合东京热| 久久偷看各类wc女厕嘘嘘| 精品熟女少妇aⅴ免费久久| 亚洲伊人久久精品影院| 久久国产成人午夜AV影院| 人妻丰满AV无码久久不卡| 色婷婷久久综合中文久久一本| 国产一区二区三区久久| 中文字幕无码免费久久| 青青久久精品国产免费看| 精品久久久久久久| 久久精品中文字幕无码绿巨人| 日韩va亚洲va欧美va久久| 日本久久久久久中文字幕| 久久国产精品成人片免费| 伊人久久精品无码二区麻豆| 香蕉99久久国产综合精品宅男自 | 免费精品久久天干天干| 久久综合丝袜日本网| 国内精品久久久久久99蜜桃| 老男人久久青草av高清| 久久久久国产精品人妻| 久久婷婷五月综合成人D啪| 性高湖久久久久久久久AAAAA| 久久国产精品偷99| 精品久久人人做人人爽综合| 国产农村妇女毛片精品久久| 国产成人99久久亚洲综合精品| 99精品伊人久久久大香线蕉| 欧美精品一本久久男人的天堂| 色综合久久精品中文字幕首页| 久久精品一区二区国产| 国产激情久久久久影院| 久久久精品2019免费观看|