首页| 论坛| 消息
主题:关于第十届普及组火星人的问题
回帖:你的好复杂啊.........
program martian;
var
a:array[1..20000]of integer;
x,y,i,m,n,j,k,t:integer;
begin
assign(input,'martian.in'); reset(input);
assign(output,'martian.out'); rewrite(output);
readln(n,m);
for i:=1 to n do read(a);
for k:=1 to m do
begin
x:=n-1;
while a>a do dec(x);
y:=x+1;
while (ya) do inc(y);
t:=a; a:=a; a:=t;
for j:=x+1 to x+(n-x)div 2 do
begin
t:=a; a:=a; a:=t;
end;
end;
for i:=1 to n do write(a,' ');
close(input);
close(output);
end.
下一楼›:program p1092;
var
n,i,now:longint;
m:int64;
d:array[0..21]of qword;
..
‹上一楼:这是我的程序!
是对的!

--> 查看全部回帖(4)
«返回主帖