Judging Olympia
来源:互联网 发布:芭芭拉史翠珊 知乎 编辑:程序博客网 时间:2024/04/28 12:00
点击打开链接
Judging Olympia
Time Limit: 1000MS Memory limit: 65536K
题目描述
For years, a group of Regional Contest Directors (RCDs) of the ACM International Collegiate Programming Contest (ICPC) have been unsatisfied with the way contest submissions get ranked. The group sees it is academically wrong to emphasize the importance of program correctness, disregarding the “quality” of the program itself. After all, programming as a profession promotes design, style, maintainability, etc. and not just correctness. The group’s suggestion is to have a panel of six judges. Each judge is assigned the task of grading the submissions based on a particular aspect: 1) Correctness; 2) Robustness; 3) Overall design; 4) Clarity; 5) Coding style; and finally 6) Maintainability. The final grade of a submission would be the average of the six grades it gets.
The old guards of the current ICPC judging style have always responded that it is not possible to impartially judge a program on anything but correctness. How can the ICPC be certain that judging is fair? In other words, how can the ICPC be sure that non of the judges is favoring certain teams and disadvantaging others? Any hint of accusation to the judging process and ICPC loses the prestigious status it worked on for years. (Alright! So they do have a point.) Still, this hasn’t stopped other domains from judging candidates based on subjective metrics. Take for example Gymnastics, or The Nobel Prizes, or even the ACM’s very own Doctoral Dissertation Award. These are all highly respected awards where the winner is selected by judges using subjective metrics. ICPC could use a new judging system based on what is used in gymnastics. Rather than having each judge grade a certain aspect of the program, each of the six judges would assign an overall grade (out of ten) based on all of the six metrics mentioned above. To enforce impartiality, the final grade of a submission would be calculated as the average of all the grades after deleting two grades: The highest and the lowest. Any judge that favors a certain team (and assigns them an undeserved high grade,) risks the possibility of that grade being dismissed. Similarly, any judge that attempts to disadvantage a team by assigning them a low grade faces a similar risk. Write a program to print the final grade of a submission.
输入
Your program will be tested on one or more test cases. Each test case is described on a single input line listing the grades of the judges. The end of the test cases is identified with a dummy test case with all the grades being zero.
输出
For each test case, print the grade on a separate line (without unnecessary decimal points and/or zeros.)
示例输入
8 8 8 4 4 48 8 6 4 4 30 0 0 0 0 0
示例输出
65.5
提示
来源
示例程序
此题要用g%输出才行。
#include<stdio.h>#include<iostream>#include<algorithm>using namespace std;int z[6];int cmp(int x,int y){ return x<y;}int main(){ while(scanf("%d",&z[0])!=EOF) { for(int a=1; a<6; a++) scanf("%d",&z[a]); if(z[0]==0&&z[1]==0&&z[2]==0&&z[3]==0&&z[4]==0&&z[5]==0)break; sort(z,z+6,cmp); int count=0; for(int b=1; b<5; b++) { count+=z[b]; } double ans; ans=(count*1.0/4.0); printf("%g\n",ans); }}
- Judging Olympia
- Judging Olympia
- poj 3507 Judging Olympia
- TOJ 3039.Judging Olympia
- 【POJ解题】:POJ3507 Judging Olympia
- POJ 3507 Judging Olympia G++
- POJ 3507 Judging Olympia(简单题)
- POJ 3507 Judging Olympia(水~)
- POJ 3507 Judging Olympia 模拟 水
- POJ 3507 Judging Olympia (格式控制)
- PKU_ACM_3507_Judging Olympia
- hogan olympia uomo NtEANFaObYi9HqWrKA
- UVALive 6678 Judging Troubles
- #1 Judging Cars
- nyoj 695 Judging Filling Problems
- HNU Judging Troubles (字典树)
- Judging Troubles (multiset查找)
- UVALive6959 Judging Troubles map应用
- linux/ubuntu下使用jni的demo
- Mysql workbench中PK.NN等的意思
- SDUT 第九周周赛
- 黑马程序员-数组
- 几个OJ链接
- Judging Olympia
- Stanford ML - Lecture 5 - Neural Networks: Learning
- 关于计算机体系结构之RAM
- 第一个windows8应用程序
- PHP安装eAccelerator加速器
- 如何在C/C++中动态分配二维数组
- Spring aop拦截器
- JAVA基础知识
- java中String Date Timestamp Calendar 之间的关系及转换