- 谁拿了最多奖学金
- 2009-04-22 13:18:31 @
type
tj=record
m:string;
q,b:integer;
g,s:char;
l:integer;
end;
var
a:array[1..100]of tj;
i,n:integer;
j,t,max:longint;
maxn:string;
ch,ch1,ch2:char;
begin
readln(n);
for i:=1 to n do
begin
ch:='1';
while not(ch=' ')do
begin
read(ch);
a[i].m:=a[i].m+ch;
end;
read(a[i].q,a[i].b,ch2);
read(a[i].g,ch1,a[i].s);
readln(a[i].l);
end;
for i:=1 to n do
begin
j:=0;
if(a[i].q>80)and(a[i].l>0)then
inc(j,8000);
if(a[i].q>85)and(a[i].b>80)then
inc(j,4000);
if a[i].q>90 then
inc(j,2000);
if(a[i].q>85)and(a[i].s='Y')then
inc(j,1000);
if(a[i].b>80)and(a[i].g='Y')then
inc(j,850);
if j>max then
begin
max:=j;
maxn:=a[i].m;
end;
t:=t+j;
end;
writeln(maxn);
writeln(max);
write(t);
end.{
0 条评论
目前还没有评论...