#include<cstdio>
int n,s[101],k,h,sum;
struct node
{
char name[20];
int end;
int often;
char job;
char west;
int a;
}f[101];
int main()
{
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%s %d %d %c %c %d",f[i].name,&f[i].end,&f[i].often,&f[i].job,&f[i].west,&f[i].a);
if(f[i].end>80&&f[i].a>=1) s[i]+=8000;
if(f[i].end>85&&f[i].often>80) s[i]+=4000;
if(f[i].end>90) s[i]+=2000;
if(f[i].end>85&&f[i].west=='Y') s[i]+=1000;
if(f[i].often>80&&f[i].job=='Y') s[i]+=850;
sum+=s[i];
if(s[i]>k)
{
k=s[i];h=i;
}
}
puts(f[h].name);
printf("%d\n%d",s[h],sum);
}

1 条评论

  • @ 2016-12-03 16:32:10

    include<cstdio>
    int n,s[101],k,h,sum;
    struct node
    {
    char name[20];
    int end;
    int often;
    char job;
    char west;
    int a;
    }f[101];
    int main()
    {
    scanf("%d",&n);
    for(int i=0;i<n;i++) { scanf("%s %d %d %c %c %d",f[i].name,&f[i].end,&f[i].often,&f[i].job,&f[i].west,&f[i].a); if(f[i].end>80&&f[i].a>=1) s[i]+=8000;
    if(f[i].end>85&&f[i].often>80) s[i]+=4000;
    if(f[i].end>90) s[i]+=2000;
    if(f[i].end>85&&f[i].west=='Y') s[i]+=1000;
    if(f[i].often>80&&f[i].job=='Y') s[i]+=850;
    sum+=s[i];
    if(s[i]>k)
    {
    k=s[i];h=i;
    }
    }
    puts(f[h].name);
    printf("%d\n%d",s[h],sum);
    }

  • 1

信息

ID
1001
难度
5
分类
模拟 点击显示
标签
递交数
39312
已通过
12809
通过率
33%
被复制
132
上传者