#include "partition.h"
#include<bits/stdc++.h>

using namespace std;
map<int,bool>m;

vector<int> solve(vector<int> A)
{
    vector<int>ans1;
    vector<int>ans2;
    for(int i=0;i<A.size();i++)
    {
        if(m[A[i]]==0)
        {
            ans1.push_back(i);
            m[A[i]]=1;
        }
        else
        {
            ans2.push_back(i);
            m[A[i]]=0;
        }
    }
    vector<int>ans;
    for(int i=0;i<ans1.size();i++)ans.push_back(ans1[i]);
    for(int i=0;i<ans2.size();i++)ans.push_back(ans2[i]);
    return ans;
}
