比赛 20121121 评测结果 EEEEEEEEEE
题目名称 谁拿了最多奖学金 最终得分 0
用户昵称 xiebin 运行时间 0.003 s
代码语言 Pascal 内存使用 0.19 MiB
提交时间 2012-11-21 20:41:11
显示代码纯文本
Var
 N,i,j,num,max:longint;
 name:array[1..100] of string;
 final,class,article,scholar:array[1..100] of longint;
 ganbu,xibu:array[1..100] of char;
 ch:char;
Begin
Assign(input,'scholar.in');Reset(input);
Assign(output,'scholar.out');Rewrite(output);
Readln(N);
For i:=1 to N do begin
 Read(ch);
 While ch<>' ' do
  begin
   name[i]:=name[i]+ch;
   read(ch);
  end;
 Readln(final[i],class[i],ganbu[i],xibu[i],article[i]);
 end;
For i:=1 to N do
  begin
   If (final[i]>80)and(article[i]>=1) then inc(scholar[i],8000);
   If (final[i]>85)and(class[i]>80) then inc(scholar[i],4000);
   If final[i]>90 then inc(scholar[i],2000);
   If (final[i]>85)and(xibu[i]='Y') then inc(scholar[i],1000);
   If (class[i]>80)and(ganbu[i]='Y') then inc(scholar[i],850);
  end;
num:=0;j:=0;max:=0;
For i:=1 to N do begin
  num:=num+scholar[i];
  If scholar[i]>max then begin j:=i;max:=scholar[i];end;
 end;
Writeln(name[j]);
Writeln(max);
Writeln(num);
Close(input);
Close(output);
End.