partition by parity by not

k;a[1<<18];main(n){for(;gets(&n)?++a[atoi()]:k>2e5?puts(""),k%=3:!a[k]--?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