大神们求拯救,为什么样例过了结果一个点都没过

program ex8;
var na:array[1..100,1..21] of char;
a,b,sch,f:array[1..100] of integer;
c,d:array[1..100] of char;
i,j,n,max,sum,asd,code:integer;
ch:char;
sr:string;
begin
read(n);
for i:=1 to n do
begin
sch[i]:=0;
c[i]:='1';
end;
sum:=0;
max:=0;
for i:=1 to n do
for j:=1 to 21 do
begin
read(na[i,j]);
if (na[i,j]=' ') then
begin
read(a[i],b[i]);
read(sr);
c[i]:=sr[2];
d[i]:=sr[4];
delete(sr,1,5);
val(sr,f[i],code);
break;
end;
end;
for i:=1 to n do
begin
if (a[i]>80) and (f[i]>=1) then sch[i]:=sch[i]+8000;
if (a[i]>85) and (b[i]>=80) then sch[i]:=sch[i]+4000;
if a[i]>90 then sch[i]:=sch[i]+2000;
if (a[i]>85) and (d[i]='Y') then sch[i]:=sch[i]+1000;
if (b[i]>80) and (c[i]='Y') then sch[i]:=sch[i]+850;
end;
for i:=1 to n do
begin
sum:=sum+sch[i];
if sch[i]>max then
begin
max:=sch[i];
asd:=i;
end;
end;
for i:=1 to 21 do
if na[asd,i]<>' ' then write(na[asd,i])
else break;
writeln;
writeln(sch[asd]);
writeln(sum);
end.

0 条评论

目前还没有评论...

信息

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