绝对不是05年数据

type
bb=record
cj,yp,lw,jj:longint;

name,xb,gb:string;
end;
var
a:array[1..100]of bb;
i,s,n:longint;
max:bb;
ss:string;
begin
readln(n);
for i:=1 to n do
begin
readln(ss);
ss:=ss+' ';
a[i].name:=copy(ss,1,pos(' ',ss)-1);
delete(ss,1,pos(' ',ss));
val(copy(ss,1,pos(' ',ss)-1),a[i].cj);
delete(ss,1,pos(' ',ss));
val(copy(ss,1,pos(' ',ss)-1),a[i].yp);
delete(ss,1,pos(' ',ss));
a[i].gb:=copy(ss,1,pos(' ',ss)-1);
delete(ss,1,pos(' ',ss));
a[i].xb:=copy(ss,1,pos(' ',ss)-1);
delete(ss,1,pos(' ',ss));
val(copy(ss,1,pos(' ',ss)-1),a[i].lw);
end;
max.jj:=0;
for i:=1 to n do
begin
if (a[i].cj>85)and(a[i].lw>0)then
a[i].jj:=a[i].jj+8000;
if (a[i].cj>85)and(a[i].yp>80)then
a[i].jj:=a[i].jj+4000;
if (a[i].cj>90) then
a[i].jj:=a[i].jj+2000;
if (a[i].cj>85)and(a[i].xb='Y') then
a[i].jj:=a[i].jj+1000;
if (a[i].yp>80)and(a[i].gb='Y') then
a[i].jj:=a[i].jj+850;
if a[i].jj>max.jj then
max:=a[i];
s:=s+max.jj;
end;
writeln(max.name);
writeln(max.jj);
writeln(s);
end.

0 条评论

目前还没有评论...

信息

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