题目1002:Grading
#include <stdio.h>
#include <iostream>
#include <stack>
#include <string.h>
#include <queue>
#include <cmath>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <string>
using namespace std;
typedef long long LL;
int ans[1000000];
int main() {
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
double P, T, G1, G2, G3, GJ;
while(scanf("%lf %lf %lf %lf %lf %lf", &P, &T, &G1, &G2, &G3, &GJ) != EOF) {
if(abs(G1 - G2) <= T){
printf("%.1lf\n", (G1 + G2) / 2);
}else if((abs(G3 - G1) <= T && abs(G3 - G2) > T) || (abs(G3 - G2) <= T && abs(G3 - G1) > T)){
if(abs(G3 - G1) < abs(G3 - G2)){
printf("%.1lf\n", (G3 + G1) / 2);
}else{
printf("%.1lf\n", (G3 + G2) / 2);
}
}else if((abs(G3 - G1) <= T && abs(G3 - G2) <= T)){
double temp = G3 > G1 ? G3 : G1;
temp = temp > G2 ? temp : G2;
printf("%.1lf\n", temp);
}else if((abs(G3 - G1) > T && abs(G3 - G2) > T)){
printf("%.1lf\n", GJ);
}
}
return 0;
}
/**************************************************************
Problem: 1002
User: Crazy_man
Language: C++
Result: Accepted
Time:0 ms
Memory:5424 kb
****************************************************************/
本文介绍了一个考试评分系统的实现方法,该系统通过多个专家独立评分并结合容忍度来确定最终分数,确保评分过程尽可能公平。
1674

被折叠的 条评论
为什么被折叠?



