ON bit fixed by not

char s[99];a;f(n,m){n<a?n+m<a&&f(n+1,m,s[n]=48),f(n+1,m-1,s[n]=49):m||puts(s);}main(b){scanf("%d%d",&a,&b);f(0,b);}

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

download

return to the top page