- 雷曼兔(csapc)
- 2009-08-06 21:33:13 @
这样哪错了?凭什么只过了一个点啊?
type
rec=record
data:integer;
x,y:integer;
end;
var
a:array[0..2500]of rec;
n,t:integer;
ans:array[0..2500]of longint;
procedure init;
var
i,j,k:integer;
begin
readln(n);
t:=0;
for i:=1 to n do
begin
for j:=1 to n do
begin
read(k);
inc(t);
a[t].data:=k;
a[t].x:=i;a[t].y:=j;
end;
readln;
end;
end;
procedure qsort(l,r:integer);
var
x:integer;
i,j:integer;
change:rec;
begin
x:=a[(l+r)shr 1].data;
i:=l;
j:=r;
repeat
while a[i].datax do dec(j);
if a[i].data>a[j].data then
begin change:=a[i];a[i]:=a[j];a[j]:=change;end;
inc(i);
dec(j);
until i>j;
if l
0 条评论
目前还没有评论...