文件目录

#include <bits/stdc++.h>
using namespace std;
multiset<int> s1, s2;
int main()
{
    int a, n = 10;
    while (n--)
    {
        cin >> a;
        if (a % 2)
            s1.insert(a);
        else
            s2.insert(a);
    }
    for (auto i = s1.rbegin(); i != s1.rend(); i++)
        cout << *i << " ";
    for (auto i = s2.begin(); i != s2.end(); i++)
        cout << *i << " ";
    return 0;
}