partition by parity by ksk

let rec($)((_,s)::t as l)?(n=try read_int()with _->t$print_endline s)x=Sort.merge(<)[[n-n/2*2;n],string_of_int n]l$x;;[[1],""]$()

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

download

return to the top page