- 谁拿了最多奖学金
- 2017-05-15 13:34:40 @
#include<iostream>
int MAXN=1000;
using namespace std;
int main()
{
int a[MAXN][MAXN];
int b[MAXN];
memset(b,0,sizeof(b));
int n,i,j,s,temp;
int k=0;
cin>>i;
for(n=1;n<=i;n++)
{
for(j=1;j<=6;j++)
{
if(j==1||j==4||j==5){
(char) a[n][j];
}
cin>>a[n][j];
if(a[n][2]>80&&a[n][6]>=1){
b[n]+=8000;
}
if(a[n][2]>85&&a[n][3]>80){
b[n]+=4000;
}
if(a[n][2]>90){
b[n]+=2000;
}
if(a[n][2]>85&&a[n][5]==Y){
b[n]+=1000;
}
if(a[n][3]>80&&a[n][4]==Y){
b[n]+=850;
}
s=b[1];
temp=1;
if (b[n]>s){
s=b[n];
temp=n;
}
k+=b[n];
}
}
cout<<a[temp][1]<<endl;
cout<<b[temp]<<endl;
cout<<k<<endl;
return 0;
}