stable partition by yt

procedure gnat.io.a is
m,d:character;procedure r(a,b:string)is
begin
get(d);if d>'~'then put(a&b);elsif d<m then r(a&d,b);elsif d>m then r(a,b&d);else r(a,d&b);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