#include #include int main() { int n; std::cin >> n; // Input size of the array std::vector arr(n); std::vector even, odd; // Input the array for (int i = 0; i < n; ++i) { std::cin >> arr[i]; } // Split into even and odd for (int num : arr) { if (num % 2 == 0) { even.push_back(num); } else { odd.push_back(num); } } // Output even numbers std::cout << "Even: "; for (int e : even) { std::cout << e << " "; } std::cout << std::endl; // Output odd numbers std::cout << "Odd: "; for (int o : odd) { std::cout << o << " "; } std::cout << std::endl; return 0; }