program exale;
type pon=^rec;
rec=record
num:integer;
nxt:pon
end;
var p,head:pon;
i,n,m:longint;
procedure he;
begin
new(head);head^.nxt:=nil;
end;
procedure ch(a:pon);
var p,q:pon;
begin
if head^.nxt=nil then
begin
head^.nxt:=a; a^.nxt:=nil;
end
else begin
p:=head;q:=p^.nxt;
while (q<>nil) and (q^.num>p^.num) do
begin
p:=q; q:=p^.nxt; inc(m);
end;
p^.nxt:=a; a^.nxt:=q;
end;
end;
begin
readln(n);
for i:=1 to n do
begin
new(p);
readln(p^.num);
ch(p);
end;
write(m);
end.
结果出现了
测试结果1: 运行错误|普通保护错误
测试结果2: 运行错误|普通保护错误
测试结果3: 运行错误|普通保护错误
测试结果4: 运行错误|普通保护错误
测试结果5: 运行错误|普通保护错误
测试结果6: 运行错误|普通保护错误
测试结果7: 运行错误|普通保护错误
测试结果8: 运行错误|普通保护错误
测试结果9: 运行错误|普通保护错误
测试结果10: 运行错误|普通保护错误
问什么呢?
请高手么指教。
状态: Unaccepted
测评机: Xeond[6]
得分: 10分
提交日期: 2010-10-11 19:48:00
有效耗时: 172毫秒
测试结果1: 通过本测试点|有效耗时172ms
测试结果2: 测试结果错误.错误结果为:BOSSJ
BOSSG
BOSSD
BOSSH
BOSSL
BOSSI
BOSSK
BOSSB
BOSSC
BOSSE
BOSSA
BOSSF
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000094730772658539723757265983895846588
正确结果应为:BOSSB
BOSSE
BOSSH
BOSSK
BOSSC
BOSSF
BOSSI
BOSSL
BOSSA
BOSSD
BOSSG
BOSSJ
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000094730772658539723757265983895846588
测试结果3: 运行错误|普通保护错误
测试结果4: 运行错误|普通保护错误
测试结果5: 运行错误|普通保护错误
测试结果6: 运行错误|普通保护错误
测试结果7: 测试结果错误.错误结果为:BOSZS
BOSWS
Q
BOSSZ
BOSSW
A
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
正确结果应为:A
BOSSW
BOSSZ
BOSWS
BOSZS
Q
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
测试结果8: 运行错误|普通保护错误
测试结果9: 运行错误|普通保护错误
测试结果10: 运行错误|普通保护错误