This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll n;
cin >> n;
vector<ll> b(n+5);
for(ll a = 1; a <= n; a++)
{
cin >> b[a];
}
vector<ll> a;
vector<ll> is_true((2*n));
for(ll i = 1; i <= n; i++)
{
if(is_true[b[i]] == 0)
{
is_true[b[i]] = 1;
a.push_back(b[i]);
}
}
for(ll i = 1; i < 2*n; i++)
{
if(is_true[i] == 0)
{
a.push_back(i);
}
}
for(ll i = 0; i < 2*n-1; i++)
{
cout << a[i] << " ";
}
cout << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |