이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |