#include <bits/stdc++.h>
#include "partition.h"
std::vector<int> solve(std::vector<int> A)
{
    vector<int> eden, dva, vk;
    for (int i=0; i<A.size()-1; i++)
    {
        if (A[i]>0)
        {
            for (int j=i+1; j<A.size(); j++)
            {
                if (A[i]==A[j])
                {
                    eden.push_back(i);
                    dva.push_back(j);
                    A[i]=-1;
                    A[j]=-1;
                    break;
                }
            }
        }
    }
    for (int i=0; i<eden.size(); i++) vk.push_back(eden[i]);
    for (int i=0; i<dva.size(); i++) vk.push_back(dva[i]);
    return vk;
}