1023

#include
#include
#include
#include


using namespace std;

const vector &to_minnum(vector &a)
{
    if (a[0] == 0)
    {
        for (auto &r : a)
        {
            if (r != 0)
            {
                int tmp = r;
                r = a[0];
                a[0] = tmp;
                break;
            }   
        }
    }

    return a;
}

int main()
{
    vector in_num;
    vector::size_type num = 0;
    int tmp;
    while (num < 10)
    {
        if (cin >> tmp)
        {
            for (int i = 0; i < tmp; ++i)
            {
                in_num.push_back(num);
            }
            ++num;
        }
    }
    vector a = to_minnum(in_num);
    for (auto &r : a)
    {
        cout<

你可能感兴趣的:(1023)