• <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 }
            亚洲日本va中文字幕久久| 欧美伊香蕉久久综合类网站| 99久久精品国产一区二区| 青青热久久综合网伊人| 国产精品gz久久久| 久久亚洲2019中文字幕| 亚洲精品无码久久久久久| 国产精品99久久久久久人| 久久精品免费网站网| 无码精品久久久天天影视| 亚洲国产精品久久久久婷婷软件| 看全色黄大色大片免费久久久| 久久亚洲精品国产亚洲老地址| 四虎国产精品免费久久| 亚洲国产精品无码久久一线| 久久精品免费观看| 欧美麻豆久久久久久中文| 亚洲国产精品高清久久久 | 欧美亚洲国产精品久久高清| 99久久精品日本一区二区免费| 久久久久国色AV免费观看| 国产成人久久激情91| 久久热这里只有精品在线观看| 国产精品日韩欧美久久综合| 久久久久高潮毛片免费全部播放| 色偷偷88欧美精品久久久| 亚洲午夜久久久精品影院| 激情伊人五月天久久综合 | 丁香五月网久久综合| 久久久久久久久久久久久久| 久久久精品日本一区二区三区| 7777久久亚洲中文字幕| 国内精品伊人久久久久av一坑| 久久综合亚洲鲁鲁五月天| 日韩久久无码免费毛片软件| 国产激情久久久久影院老熟女| 丁香五月网久久综合| 久久中文字幕一区二区| 久久香蕉综合色一综合色88| 东京热TOKYO综合久久精品| 一本久道久久综合狠狠爱|