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

            我希望你是我獨家記憶

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

            HLOJ_1017

            Posted on 2009-10-12 14:47 Hero 閱讀(224) 評論(0)  編輯 收藏 引用 所屬分類: 代碼如詩--ACM
             1 //HLOJ_1017 string 可以用compare()來排序
             2 
             3 #include <iostream>
             4 #include <string>
             5 using namespace std ;
             6 
             7 const int size = 1100 ;
             8 
             9 int data[size] ;
            10 
            11 struct NODE
            12 {
            13     string name ;
            14     int score ;
            15 };
            16 struct NODE student[size] ;
            17 
            18 int inn, inm, ing ;
            19 
            20 int cmp( const void *a, const void * b )
            21 {
            22     struct NODE *= (struct NODE *)a ;
            23     struct NODE *= (struct NODE *)b ;
            24 
            25     if( c->score != d->score )
            26         return d->score - c->score ;
            27     else
            28         return c->name.compare( d->name ) ;
            29 }
            30 int main()
            31 {
            32     while( cin >> inn && inn )
            33     {
            34         cin >> inm >> ing ;
            35         forint i=1; i<=inm; i++ )
            36         {
            37             cin >> data[i] ;
            38         }
            39 
            40         int nump = 0 ;
            41         int ID = 0 ;
            42         forint i=1 ;i<=inn; i++ )
            43         {
            44             cin >> student[i].name ;
            45             student[i].score = 0 ;
            46 
            47             cin >> nump ;
            48             forint j=1; j<=nump; j++ )
            49             {
            50                 cin >> ID ;
            51                 student[i].score += data[ID] ;
            52             }
            53         }
            54 
            55         qsort( student+1, inn, sizeof(student[0]), cmp ) ;
            56 
            57         int out = 0 ;
            58         forint i=1; i<=inn; i++ )
            59         {
            60             if( student[i].score >= ing ) out++ ;
            61         }
            62         printf( "%d\n"out ) ;
            63 
            64         forint i=1; i<=inn; i++ )
            65         {
            66             if( student[i].score < ing ) break ;
            67 
            68             cout << student[i].name << " " << student[i].score << endl ;
            69         }
            70     }
            71     return 0 ;
            72 }
            国产亚洲精久久久久久无码AV| 老司机午夜网站国内精品久久久久久久久| 久久涩综合| 久久久国产打桩机| 91精品国产91久久久久福利| 99久久婷婷国产综合精品草原| 久久影视综合亚洲| 国产一区二区三区久久| 久久夜色精品国产| 91久久精一区二区三区大全| 久久99精品国产麻豆蜜芽| 亚洲色大成网站www久久九| 91精品婷婷国产综合久久 | 亚洲精品高清国产一久久| 久久国产V一级毛多内射| 久久棈精品久久久久久噜噜| 久久九九久精品国产| 久久精品黄AA片一区二区三区| 久久99精品国产麻豆婷婷| 久久精品中文闷骚内射| 久久久久亚洲国产| 韩国三级中文字幕hd久久精品| 久久久久久久久久免免费精品| 久久久久AV综合网成人| 亚洲愉拍99热成人精品热久久| 一本大道久久a久久精品综合| 久久久久国产精品嫩草影院| 欧美亚洲另类久久综合| 久久综合噜噜激激的五月天| 亚洲午夜无码AV毛片久久| 亚洲午夜久久影院| 久久久久久久尹人综合网亚洲| 中文字幕无码免费久久| 国产美女亚洲精品久久久综合| 伊人久久精品影院| 久久99九九国产免费看小说| 久久久久久久综合狠狠综合| 久久99九九国产免费看小说| 99久久综合国产精品免费| 狠狠色综合网站久久久久久久高清 | 亚洲精品无码久久毛片|