#include #include #include using namespace std; int main() { vector redBeads, blueBeads; int num; for (int i = 0; i < 10; i++) { cin >> num; if (num % 2 == 0) { blueBeads.push_back(num); } else { redBeads.push_back(num); } } sort(redBeads.begin(), redBeads.end()); sort(blueBeads.rbegin(), blueBeads.rend()); for (int bead : redBeads) { cout << bead << " "; } for (int bead : blueBeads) { cout << bead << " "; } cout << endl; return 0; }