当前位置: 首页 > news >正文

工农区网站建设东莞seo整站优化火速

工农区网站建设,东莞seo整站优化火速,中国十大流量网站,网络规划设计师是副高昨天做了一道简单但很麻烦的题,我只能想到结构体,并用了STL的sort方法解决了它.不过从中有许多细节问题. 题目: Problem Description Lcy wanted to choose 50 ACMers from m players to join HDU-ACM team. He made n competitions , and now is your task to make the rankli…昨天做了一道简单但很麻烦的题,我只能想到结构体,并用了STL的sort方法解决了它.不过从中有许多细节问题. 题目:   Problem Description Lcy wanted to choose 50 ACMers from m players to join HDU-ACM team. He made n competitions , and now is your task to make the ranklist. Here’re some instructions : Effective score : the sum of the best n-2 competitions’ score. One’s score in one competition : number of problems he(or she) solved divided the sum of problems all players solved. The ranklist is made , of course , by the effective score , what if some players have the same score ?Follow these rules : girls always come first , same again and younger first , again ? In lexicographic order. Input For each case , two integers in the first line : n (3 n 10)and m(m1000) The next m lines are someone’s information : name , sex (FM), grade and n integer numbers which means one’s number of solved problem in the ith competition. Output Output the first fifty players in order . Output all if m50. Sample Input 3 2 WXL F 08 3 4 5 HH M 08 3 4 5 Sample Output WXL HH   代码如下:   Code#includeiostream#includealgorithm#includestringusing namespace std;bool dic(char *a, char *b){    int p;    pstrcmp(a,b);    if(p0)        return false;    else return true;}typedef struct{    char name[21];    char sex;    int grade;    float score;    int s[11];}node;node a[1001];bool comp(node a, node b){    if(a.score ! b.score)        return a.scoreb.score;    else    {        if(a.sex ! b.sex)            return a.sexb.sex;        else if(a.grade ! b.grade)            return a.gradeb.grade;        else            return dic(a.name,b.name);    }}int main(){    int n,m,i,j,k;    float b[11],p,f[11];    while(scanf(%d%d,n,m)!EOF)    {        for(i0; im; i)        {            getchar();            scanf(%s %c %d,a[i].name,a[i].sex,a[i].grade);            for(j0; jn; j)            {                scanf(%d,a[i].s[j]);            }        }        for(i0; in; i)        {            b[i]0;            for(j0; jm; j)            {                b[i]a[j].s[i];            }        }        for(i0; im; i)        {            a[i].score0;            for(j0; jn; j)            {                p(float)a[i].s[j]/b[j];                f[j]p;            }            sort(f,fn);            for(kn-1; k1; k--)            {                a[i].scoref[k];            }        }        sort(a,am,comp);        for(i0; im; i)        {            couta[i].nameendl;            if(i49)break;        }    }    return 0;} 转载于:https://www.cnblogs.com/chenjunyu/archive/2009/05/04/1448920.html
http://www.zqtcl.cn/news/181234/

相关文章:

  • 做网站准备广州短视频拍摄公司
  • 网站建设学什么软件做电影资源网站有哪些
  • 怎么样让百度搜到自己的网站wordpress的短代码
  • 聊城专业网站建设公司电子商务网站建设与维护李建忠下载
  • icp备案网站接入信息怎么写长兴县网站建设
  • 如何在网上注册公司网站网站不想让百度收录
  • 服务器做jsp网站教程视频免费的舆情网站app下载
  • 肇庆网站建设方案优化家居定制类网站建设
  • 自助建站加盟备案的网站有什么好处
  • 科技公司企业网站建设重庆seo优化
  • 空间站天宫vr全景尚层装饰
  • 有没有专门做中考卷子的网站网络公司推广公司
  • 网站建设费用如何列支wordpress页面构建
  • 用dw做网站怎么做出下拉菜单企业进行网站建设的方式有( )
  • 纯静态网站索引怎么做如何用wampp 做网站
  • 怎样做网站吸引人wordpress数据可视化插件
  • 网站运营管理教材中国设计之窗官方网站
  • 高端网站设计高端网站制作P2P网站怎么建设
  • 一般网站建设的流程故事app怎么制作
  • 一般在什么网站上做电子请帖国外产品设计网
  • 成都网站建设987netADPR国际传媒网站建设
  • 网站开发培训光山价格低
  • 营销型企业网站诊断网站开发图片侵权
  • 电商货源网站大全HTML网站页面建设
  • 购物网站建设款流程html博客转wordpress
  • 泉州建设培训中心网站大连云购物app下载安装到手机
  • 美食网站建设策划书帮人恶意点击网站
  • 网站项目合同永久免费的网站软件
  • 门户网站有哪些局限性wordpress 登录信息
  • 某网站项目策划书怎么做一个简单的网站