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

            HLOJ_1017

            Posted on 2009-10-12 14:47 Hero 閱讀(227) 評論(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 }
            国产成年无码久久久久毛片| 国产精品一区二区久久精品涩爱 | 乱亲女H秽乱长久久久| 精品久久久久久无码中文字幕一区| 久久久久AV综合网成人| 久久国产成人亚洲精品影院| 性色欲网站人妻丰满中文久久不卡| 97久久天天综合色天天综合色hd | 国产成人久久精品一区二区三区 | 久久国产精品国语对白| 88久久精品无码一区二区毛片 | 午夜精品久久久久久中宇| 欧美一区二区精品久久| 亚洲精品白浆高清久久久久久| 99久久国产综合精品网成人影院| 武侠古典久久婷婷狼人伊人| 国产精品久久久久久福利漫画| 久久婷婷色香五月综合激情| 日本一区精品久久久久影院| 漂亮人妻被黑人久久精品| 噜噜噜色噜噜噜久久| 久久国产免费直播| 久久狠狠色狠狠色综合| 久久久久久亚洲AV无码专区| 综合久久一区二区三区| 久久国产香蕉视频| 99久久亚洲综合精品网站| 99热成人精品热久久669| 亚洲午夜无码久久久久| 久久久久久久久久久久久久| 午夜精品久久久久久影视riav| 国产精品无码久久四虎| 亚洲精品高清久久| 亚洲综合久久综合激情久久| 久久国产免费观看精品| 久久中文字幕一区二区| 91久久精品国产成人久久| 国产精品美女久久久免费| 久久99精品久久久久久齐齐 | 欧美综合天天夜夜久久| 色综合合久久天天综合绕视看 |