partition by parity by teebee

import java.util.*;enum P{P;System z;int i,j,a[]=new int[99999];{for(Scanner s=new Scanner(z.in);j++<20;a[s.nextInt()]++);for(;i<1e5||(i=j=1)<2;i+=2)for(;a[i]-->0;)z.out.println(j++<2?"\n"+i:i);}}

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

download

return to the top page