折腾了一下午……好水

program p1001;

type

     rec=record

     nam:string;

     avr:integer;

     cla:integer;

     sth:char;

     gan:char;

     lun:integer;

     tot:longint;

end;

var n,i,t,k:integer;

     a:array[1..100] of rec;

     c,d,e:char;

     tot:longint;

begin

     readln(n);

     for i:=1 to n do

               begin

               repeat

                    read(c);

                    a[i].nam:=a[i].nam+c;

                    until c=' ';

               read(a[i].avr,a[i].cla);

               read(d,a[i].gan,e,a[i].sth);

               read(a[i].lun);

               end;

     for i:=1 to n do

          if (a[i].avr>80) and (a[i].lun>0) then inc(a[i].tot,8000);

     for i:=1 to n do

          if (a[i].avr>85) and (a[i].cla>80) then inc(a[i].tot,4000);

     for i:=1 to n do

          if (a[i].avr>90) then inc(a[i].tot,2000);

     for i:=1 to n do

          if (a[i].avr>85) and (a[i].sth='Y') then inc(a[i].tot,1000);

     for i:=1 to n do

          if  (a[i].cla>80) and (a[i].gan='Y') then inc(a[i].tot,850);

     for i:=1 to n do

begin

        inc(tot,a[i].tot);  

if (a[i].tot>t) then begin t:=a[i].tot; k:=i;end;

end;

     writeln(a[k].nam);

     writeln(a[k].tot);

     writeln(tot);

end.

莫名其妙的读入错误……莫名其妙的AC……

0 条评论

目前还没有评论...

信息

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