partition by parity by hallvabo

import java.util.*;enum P{P;System Z;int i,a[]=new int[20];{for(Scanner S=new Scanner(Z.in);i<20;a[i++]=S.nextInt());for(Arrays.sort(a);i++<22;Z.out.println())for(int e:a)if(e%2!=i%2)Z.out.println(e);}}

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

download

return to the top page