- 明明的随机数
- 2012-10-20 15:47:27 @
var
t,r,q,w,e,n:integer;
a,c:array[1..100]of integer;
begin
readln(n);
r:=0;
t:=0;
for q:=1 to n do read(a[q]);
writeln;
for q:=1 to n do begin
for w:=1 to n do
if (a[q]a[w])and(qw)then r:=r+1;
if r=n-1 then begin
c[q]:=a[q];
t:=t+1;
end;
end;
for w:=1 to t do begin
for e:=1 to t do
if (we)and(c[w]>c[e])then begin
r:=c[w];
c[w]:=c[e+w];
c[e+w]:=r;
end;
for q:=1 to t do write(c[q]);
end;
end.
0 条评论
目前还没有评论...