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

            我希望你是我獨(dú)家記憶

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

            HLOJ_1017

            Posted on 2009-10-12 14:47 Hero 閱讀(228) 評(píng)論(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 }
            久久99热这里只有精品66| 要久久爱在线免费观看| 精品久久香蕉国产线看观看亚洲| 久久A级毛片免费观看| 久久美女网站免费| 色综合合久久天天给综看| 人妻精品久久无码区| 国产女人aaa级久久久级| 一本久久知道综合久久| 99久久无码一区人妻| 久久午夜福利无码1000合集| 国产精品久久久久国产A级| 亚洲国产精品嫩草影院久久| 国产精品99久久免费观看| 亚洲成av人片不卡无码久久| aaa级精品久久久国产片| 一本久道久久综合狠狠躁AV| 91精品国产高清久久久久久91| 少妇无套内谢久久久久| 国产精品熟女福利久久AV| 久久久无码精品亚洲日韩按摩| 欧美亚洲国产精品久久高清| 久久最近最新中文字幕大全| 亚洲精品无码久久久久去q| 一级做a爰片久久毛片免费陪| 久久99中文字幕久久| 久久久噜噜噜www成人网| 99精品久久久久久久婷婷| 久久强奷乱码老熟女| 丁香五月综合久久激情| 四虎国产精品免费久久5151| 久久99国产精品尤物| 久久99热只有频精品8| 漂亮人妻被黑人久久精品| 国内精品久久久久影院薰衣草 | 日日狠狠久久偷偷色综合免费| 久久久久国产一级毛片高清版| 精品少妇人妻av无码久久| 国产成人综合久久综合| 久久久青草久久久青草| 久久996热精品xxxx|