stable partition by D

procedure Gnat.Io.A is M,D:Character;procedure R(A:string)is begin
Get(D);If D>'~'Then Put(A);elsif D=M then R(D&A);elsif D>m then R(A&D);else Put(D);R(A);end if;end;begin
Get(M);R(M&"");end;

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page