状态编号: [查看该题]
状态: Unaccepted
测评机: Xeost[5]
得分: 0分
提交日期: 2008-7-15 12:50:00
有效耗时: 该状态没有记录
测试结果1: 测试结果错误.错误结果为:abcdefg
dgeasdc
fytryre
xdhyuie
dwetqte
正确结果应为:abcdefg
dgeasdc
fytryre
dwetqte
xdhyuie
测试结果2: 运行错误|未定义错误编号|错误编号:106
测试结果3: 运行错误|未定义错误编号|错误编号:106
测试结果4: 运行错误|未定义错误编号|错误编号:106
测试结果5: 运行错误|未定义错误编号|错误编号:106
测试结果6: 运行错误|未定义错误编号|错误编号:106
测试结果7: 运行错误|未定义错误编号|错误编号:106
测试结果8: 运行错误|未定义错误编号|错误编号:106
测试结果9: 运行错误|未定义错误编号|错误编号:106
测试结果10: 运行错误|未定义错误编号|错误编号:106
提交代码: var
t1,t2,t3:string ;
a:array[1..5000]of string;
b:array[1..5000]of longint;
i,n,j,x,t,y:integer;
begin
readln(n);
for i:=1 to n do
begin
readln(a[i]);
readln(b[i]);
end;
for i:=1 to n do
for j:=i to n do
if b[i]<b[j]
then begin t:=b[i]; b[i]:=b[j]; b[j]:=t; t1:=a[i]; a[i]:=a[j]; a[j]:=t1; end;
if b[i]=b[j]
then begin t1:=a[i]; t2:=a[j]; end;
if length(t1)>length(t2)
then y:=length(t2)
else y:=length(t1);
if length(t1)=length(t2)
then y:=length(t1);
while x<y do
begin
x:=x+1;
if t1[x]>t2[x]
then begin t3:=a[i]; a[i]:=a[j]; a[j]:=t3 end
else begin t3:=a[j]; a[j]:=a[i]; a[i]:=t3 end;
end;
for x:=1 to n do
writeln(a[x]);
end.
大牛帮忙看看,本人3Q得orz