partition by parity by 0mg

for(A=[,],B=[];$=readline();)with($&1?B:A)push($),sort(function(a,b)a-b);print(A.concat(B).join("\n"))

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

download

return to the top page