亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 開發設計 > 正文

HPUOJ--2017寒假作業專題0/I-SDOI

2019-11-11 05:47:28
字體:
來源:轉載
供稿:網友

I -SDOIThe Annual National Olympic of Information(NOI) will be held.The PRovince of Shandong hold a Select(which we call SDOI for short) to choose some people to go to the NOI. n(n≤100)n(n≤100) people comes to the Select and there is m(m≤50)m(m≤50) people who can go to the NOI. According to the tradition and regulation.There were two rounds of the SDOI, they are so called "Round 1" and "Round 2", the full marks of each round is 300300. All the n people take part in Round1 and Round2, now the original mark of every person is known. The rule of SDOI of ranking gets to the "standard mark". For each round there is a highest original mark,let's assume that is xx.(it is promised that not all person in one round is 0,in another way,x>0x>0). So for this round,everyone's final mark equals to his/her original mark?(300/x)mark?(300/x). After we got everyone's final mark in both round.We calculate the Ultimate mark of everyone as 0.3?round1′s0.3?round1′s final mark + 0.7?round2′s0.7?round2′s final mark.It is so great that there were no two persons who have the same Ultimate mark. After we got everyone's Ultimate mark.We choose the persons as followed: To encourage girls to take part in the Olympic of Information.In each province,there has to be a girl in its teams. 1. If there is no girls take part in SDOI,The boys with the rank of first m enter the team. 2. If there is girls, then the girl who had the highest score(compared with other girls) enter the team,and other(boys and other girls) m-1 people with the highest mark enter the team. Just now all the examination had been finished.Please write a program, according to the input information of every people(Name, Sex ,The original mark of Round1 and Round2),Output the List of who can enter the team with their Ultimate mark decreasing. InputThere is an integer T(T≤100)T(T≤100) in the first line for the number of testcases and followed TT testcases. For each testcase, there are two integers nn and mm in the first line(n≥m)(n≥m), standing for the number of people take part in SDOI and the allowance of the team.Followed with nn lines,each line is an information of a person. Name(A string with length less than 2020,only contain numbers and English letters),Sex(male or female),the Original mark of Round1 and Round2 (both equal to or less than 300300) separated with a space. OutputFor each testcase, output "The member list of Shandong team is as follows:" without Quotation marks. Followed mm lines,every line is the name of the team with their Ultimate mark decreasing.Sample Input
210 8dxy male 230 225davidwang male 218 235evensgn male 150 175tpkuangmo female 34 21guncuye male 5 15faebdc male 245 250lavender female 220 216qmqmqm male 250 245davidlee male 240 160dxymeizi female 205 1902 1dxy male 300 300dxymeizi female 0 0Sample Output
The member list of Shandong team is as follows:faebdcqmqmqmdavidwangdxylavenderdxymeizidavidleeevensgnThe member list of Shandong team is as follows:dxymeiziHintFor the first testcase: the highest mark of Round1 if 250,so every one's mark times(300/250)=1.2, it's same to Round2.The Final of The Ultimate score is as followedfaebdc 298.20qmqmqm 295.80davidwang 275.88dxy 271.80lavender 260.64dxymeizi 233.40davidlee 220.80evensgn 201.00tpkuangmo 29.88guncuye 14.40For the second testcase,There is a girl and the girl with the highest mark dxymeizi enter th#include<cstdio>#include<cstring>#include<algorithm>using namespace std;struct stu{char name[22];char sex[10];double or1;double or2;double fr1;double fr2;double f;int l;}data[100+11];bool cmp1(stu A,stu B){return A.or1>B.or1;}bool cmp2(stu A,stu B){return A.f>B.f;}bool cmp3(stu A,stu B){return A.or2>B.or2;}int main(){int T,n,m,i,j;double x1,x2;scanf("%d",&T);while(T--){j=-1;scanf("%d%d",&n,&m);for(i=0;i<n;i++){scanf("%s %s %lf %lf",data[i].name,data[i].sex,&data[i].or1,&data[i].or2);}sort(data,data+n,cmp1);x1=data[0].or1;sort(data,data+n,cmp3);x2=data[0].or2;for(i=0;i<n;i++){data[i].fr1=data[i].or1*(300/x1);data[i].fr2=data[i].or2*(300/x2);data[i].f=data[i].fr1*0.3+data[i].fr2*0.7;data[i].l=strlen(data[i].sex);}sort(data,data+n,cmp2);for(i=0;i<n;i++){if(data[i].l==6){j=i;break;}}printf("The member list of Shandong team is as follows:/n");if(j==-1||j>=0&&j<m){for(i=0;i<m;i++){printf("%s/n",data[i].name);}}else if(j>=m){for(i=0;i<m-1;i++){printf("%s/n",data[i].name);}printf("%s/n",data[j].name);}}return 0;}


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
日韩精品福利网站| 日韩电视剧在线观看免费网站| 日韩精品亚洲精品| 韩国美女主播一区| 日韩国产精品一区| 久久久亚洲影院| 91a在线视频| 伊人久久久久久久久久久久久| 日韩av片永久免费网站| 伊人久久大香线蕉av一区二区| 欧美黄色性视频| 亚洲激情成人网| 日韩经典第一页| 久久久久久国产免费| 国产精品自产拍在线观看中文| 国产精品热视频| 欧美与黑人午夜性猛交久久久| 欧美另类99xxxxx| 亚洲大胆人体视频| 日韩成人av在线| 欧美专区在线观看| 777国产偷窥盗摄精品视频| 欧美国产高跟鞋裸体秀xxxhd| 成人在线视频网| 欧美一区深夜视频| 日产精品久久久一区二区福利| 欧美极品欧美精品欧美视频| 精品欧美一区二区三区| 少妇高潮 亚洲精品| 欧美一区二区三区免费视| 日韩av影院在线观看| 国产精品高潮视频| 日韩一区二区三区xxxx| 国产精品视频yy9099| 日韩美女在线看| 久久久999成人| 欧美日韩国产精品一区二区不卡中文| 欧美性在线观看| 国产一区香蕉久久| 在线看片第一页欧美| 日韩精品高清在线| 91久久精品久久国产性色也91| 欧美日韩国产综合新一区| 精品亚洲一区二区三区四区五区| 宅男66日本亚洲欧美视频| 精品人伦一区二区三区蜜桃免费| 欧美电影在线播放| 久久久久久久久久久亚洲| 欧美巨乳在线观看| 性欧美亚洲xxxx乳在线观看| 精品久久久久久中文字幕| 韩国v欧美v日本v亚洲| 97国产精品视频| 97视频在线免费观看| 成人福利网站在线观看11| 成人网在线观看| 51视频国产精品一区二区| 国产成人精品久久二区二区91| 黄色成人av网| 亚洲国产精品高清久久久| 欧美区二区三区| 久久精品国产清自在天天线| 久久精品国产2020观看福利| 日韩欧美中文字幕在线播放| 九九九久久国产免费| 色婷婷**av毛片一区| 久久精品视频99| 国产精品美女呻吟| 国产精品视频久久久| 亚洲人精选亚洲人成在线| 九九热这里只有精品6| 国产97色在线|日韩| 日韩专区在线播放| 欧美激情免费看| 日韩久久精品电影| 亚洲欧美中文在线视频| 亚洲国产第一页| 亚洲电影中文字幕| 国产日韩在线一区| 久久久久99精品久久久久| xvideos成人免费中文版| 亚洲人午夜精品免费| 亚洲欧洲在线看| 国产成人午夜视频网址| 久久成年人免费电影| 最近2019年日本中文免费字幕| 国产成人亚洲精品| 在线播放国产一区二区三区| 日韩在线观看免费高清完整版| 成人性生交大片免费看小说| 久久久久久久97| 欧美在线免费看| 久久高清视频免费| 中文字幕亚洲一区| 久久亚洲综合国产精品99麻豆精品福利| 亚洲欧美国产日韩天堂区| 中文字幕亚洲在线| 亚洲男人天堂2019| 欧美激情奇米色| 国产午夜精品免费一区二区三区| 日韩精品在线观看网站| 日韩精品免费观看| 久久综合久久美利坚合众国| 欧美丝袜美女中出在线| 精品美女永久免费视频| 精品网站999www| 欧美日韩成人网| 日韩精品免费看| 久久这里只有精品视频首页| 欧美体内谢she精2性欧美| 精品国产自在精品国产浪潮| 欧美视频专区一二在线观看| 一区二区国产精品视频| 91精品久久久久久久久中文字幕| 日韩综合中文字幕| 亚洲国产精彩中文乱码av在线播放| 国产精品视频男人的天堂| 91在线精品视频| 精品夜色国产国偷在线| 亚洲аv电影天堂网| 久久精品国产精品| 精品久久久久久久久久久| 成人精品一区二区三区电影黑人| 日韩va亚洲va欧洲va国产| 成人免费高清完整版在线观看| 国产精品吴梦梦| 国产不卡av在线| 国产精品久久97| 成人欧美一区二区三区在线湿哒哒| 亚洲成人av在线| 在线看国产精品| 亚洲天堂av高清| 色天天综合狠狠色| 亚洲成人性视频| 色悠悠久久88| 欧美主播福利视频| 亚洲性猛交xxxxwww| 国语自产精品视频在线看抢先版图片| 国产香蕉一区二区三区在线视频| 久久97久久97精品免视看| 成人在线免费观看视视频| 国产精品免费一区二区三区都可以| 亚洲第一在线视频| 成人久久18免费网站图片| 亚洲新中文字幕| 精品中文视频在线| 国产精品欧美激情在线播放| 国内成人精品视频| 国产成人久久久精品一区| 5566日本婷婷色中文字幕97| 亚洲国产高潮在线观看| 亚洲第一黄色网| 久久精品国产成人精品| 国产精品日韩欧美大师| 成人国内精品久久久久一区| 蜜臀久久99精品久久久无需会员| 欧美日韩激情美女| 日韩电影大片中文字幕| 91亚洲精品久久久| 69久久夜色精品国产69乱青草| 亚洲人成网站999久久久综合| 亚洲网站在线播放| 国产精品99一区| 久久久噜噜噜久久中文字免|