为什么会超时?求大神帮忙

var
mindan:array[1..100]of string;
money:array[1..100]of integer;
minzi,zuiduo:string;
n,i,a,b,e,t:longint;
c,d:char;
begin
readln(n);
t:=0;
for i:=1 to n do
begin
read(minzi,a,b,c,d,e);
mindan[i]:=minzi;
if (e>=1) and (a>80) then t:=t+8000;
if (a>85) and (b>80) then t:=t+4000;
if (a>90) then t:=t+2000;
if (a>85) and (d='Y') then t:=t+1000;
if (b>80) and (c='Y') then t:=t+850;
money[i]:=t;
t:=0;
end;
for i:=1 to n-1 do
if money[i]>money[i+1] then
begin
zuiduo:=mindan[i];
t:=money[i];
end
else if (money[i]=money[i+1]) and (money[i]>t) then
begin
zuiduo:=mindan[i];
t:=money[i];
end;
writeln(zuiduo);
writeln(t);
t:=0;
for i:=1 to n do
t:=t+money[i];
writeln(t);
end.

0 条评论

目前还没有评论...

信息

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