partition by parity by not

k;a[1<<18];main(n){for(;gets(&n)?++a[atoi()]:!a[k]--?k=k>1e5?~k&puts(""):k+2:printf("%d\n",k););}

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

download

return to the top page