#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int N=105;
struct qwe
{
char zxc[25],o,p;
int num1,num2,num3,sum1;
}a[N];
bool cmp(qwe q,qwe w)
{
return q.sum1>w.sum1;
}
int main()
{
int n,i,sum=0;
scanf("%d\n",&n);
for(i=1;i<=n;i++)
{
scanf("%s ",a[i].zxc);
scanf("%d %d ",&a[i].num1,&a[i].num2);
scanf("%c %c ",&a[i].o,&a[i].p);
scanf("%d\n",&a[i].num3);
if(a[i].num1>80&&a[i].num3>=1)
{
a[i].sum1+=8000;
sum+=8000;
}
if(a[i].num1>85&&a[i].num2>80)
{
a[i].sum1+=4000;
sum+=4000;
}
if(a[i].num1>90)
{
a[i].sum1+=2000;
sum+=2000;
}
if(a[i].num1>85&&a[i].p=='Y')
{
a[i].sum1+=1000;
sum+=1000;
}
if(a[i].num2>80&&a[i].o=='Y')
{
a[i].sum1+=850;
sum+=850;
}
}
sort(a+1,a+n+1,cmp);
printf("%s\n",a[1].zxc);
printf("%d\n",a[1].sum1);
printf("%d\n",sum);
}

1 条评论

  • 1

信息

ID
1001
难度
5
分类
模拟 点击显示
标签
递交数
31926
已通过
10746
通过率
34%
上传者