Graph by nai

short s[99][99];p;n;r;g(t,k,i){for(i=n;t*i--;)s[k][i]%2&&g(t-1,i);r+=!t*!k;}f(k){k&&gets(s[n-k--])^f(k)^printf("%d%c"-!k,r,n+~k?32:10,g(p,k),r=0);}main(){for(;~scanf("%d%d ",&p,&n);)f(n);}

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

download

return to the top page