额,谁帮我看看啊,明明样例都过了的说

var name1:array[0..100] of string;
infor:array[0..100] of string;
score1,score2,boo1,boo2:array[1..100] of string;
money:array[0..100] of longint;
h:array[0..100] of longint;
j,l,k,p,i,n,max,tot:longint;
////////////////////////////////////////////////////
procedure make;
begin
j:=0;
readln(n);
for i:=1 to n do
readln(infor[i]);
repeat
l:=1;
k:=1;
inc(j);
while infor[j][l]<>' ' do inc(l);
k:=l-1;
p:=k+2;
name1[j]:=copy(infor[j],1,k);
inc(l);
while infor[j][l]<>' ' do inc(l);
k:=l-1;
score1[j]:=copy(infor[j],p,k-p+1);
inc(l);
p:=k+2;
while infor[j][l]<>' ' do inc(l);
k:=l-1;
score2[j]:=copy(infor[j],p,k-p+1);
inc(l);
p:=k+2;
while infor[j][l]<>' ' do inc(l);
k:=l-1;
boo1[j]:=copy(infor[j],p,k-p+1);
inc(l);
p:=k+2;
while infor[j][l]<>' ' do inc(l);
k:=l-1;
boo2[j]:=copy(infor[j],p,k-p+1);
p:=k+2;
val(infor[j][p],h[j]);
until j>=n;
end;
//???????????????????????????????????????
procedure work;
begin
fillchar(money,sizeof(money),0);
for i:=1 to n do
begin
if (score1[i]>'80') and (h[i]>=1) then inc(money[i],8000);
if (score1[i]>'85') and (score2[i]>'80') then inc(money[i],4000);
if (score1[i]>'90') then inc(money[i],2000);
if (score1[i]>'80') and (boo2[i]='Y') then inc(money[i],1000);
if (score2[i]>'80') and (boo1[i]='Y') then inc(money[i],850);
end;
end;
//??????????????????????????????????????????????????
procedure put;
begin
max:=1;
tot:=0;
for i:=1 to n do
inc(tot,money[i]);
for i:=1 to n do
if money[i]>money[max] then max:=i;
end;
//................................................
begin
make;
work;
put;
writeln(name1[max]);
writeln(money[max]);
writeln(tot);
end.

0 条评论

目前还没有评论...

信息

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