Sign of permutations by sadakiyo

t;v;i;r;c;l;o;d[11][11];main(f){for(;f;v=!c?v:0,o=r==10,o?puts("-1"+(t&1^1)):0,memset(d,0,484*o),i*=!o,t*=!o,r=10)for(f=read(0,&r,1),c=r<48,v=!c?v*10+r-48:v,i+=c,l=0;c&&l<12;t+=(1<++d[i][l*(l<v)]),t+=(1<++d[l*(l++<i)][v]));}

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page