type asdf=record
names:string;
qimo:0..100;
bp:0..100;
west:char;
yn:char;
lun:0..10;
f:char;
end;
var a:array[1..100]of asdf;
n,i,max ,money:integer; na,s:string; total:longint; x:char;
begin
readln(n); max:=0; total:=0;
for i:=1 to n do
begin
money:=0; s:='';
read(x);
while x<>' 'do
begin
s:=s+x; read(x);
end;
with a[n] do
begin
read(qimo);
read(bp); read(f);
read(yn); read(f);
read(west);
read(lun);
end;
if (a[n].qimo >80) and (a[n].lun>=1)
then inc(money,8000);
if (a[n].qimo >85) and (a[n].bp>80)
then inc(money,4000);
if (a[n].qimo >90)
then inc(money,2000);
if (a[n].qimo >85) and (a[n].west='Y')
then inc(money,1000);
if (a[n].bp>80) and (a[n].yn='Y')
then inc(money,850);
total:=money+total;
if money>max then
begin
max:=money;
na:=s;
end;
end;
writeln(na);
writeln(max);
writeln(total);
end.
测试结果错误.错误结果为:
YDCmkIYBPOy
15000
332750
正确结果应为:YDCmkIYBPOy
15000
332750