#include <stdio.h> void main() { int a[100], b[100], n, i, j, temp; int ji = 0; int ou = 0; int count = 0; scanf("%d", &n); for (i = 0; i != n; ++i) { scanf("%d", &a[i]); if (a[i] % 2 == 0) { count++; } } ji = count; for (i = 0; i != n; ++i) { if (a[i] % 2 == 0) { b[ou] = a[i]; ou++; } else { b[ji] = a[i]; ji++; } }