Permutations by pooq

void f(string a,string b){if(a=="")write(b);for(int i;i<length(a);++i)f(substr(a,0,i)+substr(a,i+1),b+substr(a,i,1)+(length(a)<2?"":" "));};f("012345","");

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

download

return top