- 陶陶抢苹果
- 2009-09-02 20:59:46 @
program jsa;
var
a,b,temp,i,j,z,y,o:integer;
x:real;
c,d,e:array[1..maxint] of integer;
bo:boolean;
begin
read(a,b); readln;
for i:=1 to a do
read(c[i]);readln;
for i:=1 to b do
read(d[i]);
i:=1;
repeat
bo:=true;
for j:=1 to a-i do
if c[j]y then y:=y+1; o:=y; for z:=1 to o do
for i:=b downto 1 do
if c[j]9999 then begin
e[i]:=c[j]+e[i]; c[j]:=9999;j:=j+1; end else j:=j+1;
for i:=1 to b do write(e[i],' ');
writeln;
end.
0 条评论
目前还没有评论...