• <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 閱讀(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 }
            久久国产视频网| 久久香蕉一级毛片| 区久久AAA片69亚洲| 精品国产乱码久久久久软件| 国产A三级久久精品| 97久久国产亚洲精品超碰热| 久久久久久久综合日本| 亚洲日本va中文字幕久久| 久久棈精品久久久久久噜噜| 国产一区二区三精品久久久无广告 | 久久国产精品久久精品国产| 91精品国产色综合久久| 少妇久久久久久被弄到高潮| 久久精品国产第一区二区三区| 久久99精品国产麻豆蜜芽| 伊人久久大香线蕉综合Av | 久久九九兔免费精品6| 2020最新久久久视精品爱 | 久久国产香蕉视频| 99久久无色码中文字幕| 麻豆精品久久久久久久99蜜桃| 久久国产视屏| 亚洲成色999久久网站| 一本一本久久aa综合精品| 欧美精品丝袜久久久中文字幕| 精品久久久久香蕉网| 久久久一本精品99久久精品88| 久久亚洲中文字幕精品一区| 久久er国产精品免费观看2| 久久久久无码精品国产| 久久亚洲国产精品成人AV秋霞 | 伊人久久精品无码av一区| 久久精品夜色噜噜亚洲A∨| 国产精品久久免费| 国产成人精品久久二区二区| 久久久精品国产sm调教网站| 色天使久久综合网天天| 久久丫忘忧草产品| 狠狠色婷婷久久一区二区| 国产亚洲精久久久久久无码77777| 久久中文字幕无码专区|