大牛帮忙查一下错啊!!!

program asf;

type

aa=record

s:string;

q:longint;

b:longint;

xs:boolean;

xb:boolean;

l:longint;

jxj:longint;

end;

var

s1,s2:string;

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

x,i,j,k,r,t,b:longint;

c:int64;

begin

readln(x);

b:=1;

c:=0;

for i:=1 to x do

begin

j:=0;

readln(s1);

while s1[j]' ' do

inc(j);

j:=j-1;

a[i].s:=copy(s1,1,j);

inc(j);

k:=j;

t:=0;

while (s1[k]' ')or (k=j) do begin inc(t); inc(k); end;

inc(j);

t:=t-1;

s2:=copy(s1,j,t);

val(s2,a[i].q);

inc(k);

t:=0;

r:=k;

while (s1[r]' ') do begin inc(t); inc(r); end;

s2:=copy(s1,k,t);

val(s2,a[i].b);

while (s1[j]'Y') and(s1[j]'N') do

begin

inc(j);

if s1[j]='Y' then a[i].xs:=true else if s1[j]='N' then a[i].xs:=false;

end;

inc(j);

while (s1[j]'Y') and(s1[j]'N') do

begin

inc(j);

if s1[j]='Y' then a[i].xb:=true else if s1[j]='N' then a[i].xb:=false;

end;

inc(j);

s2:=copy(s1,j+1,length(s1)-j+1);

val(s2,a[i].l);

a[i].jxj:=0;

if (a[i].q>80) and (a[i].l>=1) then a[i].jxj:=a[i].jxj+8000;

if (a[i].q>85) and(a[i].b>80) then a[i].jxj:=a[i].jxj+4000;

if (a[i].q>90) then a[i].jxj:=a[i].jxj+2000;

if (a[i].q>85)and (a[i].xb) then a[i].jxj:=a[i].jxj+1000;

if (a[i].b>80)and (a[i].xs) then a[i].jxj:=a[i].jxj+850;

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

if a[i].jxj>a.jxj then b:=i;

end;

writeln(a.s);

writeln(a.jxj);

writeln(c);

end.

到底哪错了??

郁闷ing……

1 条评论

  • 1

信息

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