답안 #784413

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
784413 2023-07-16T05:58:45 Z mdaaomi 중앙값 배열 (balkan11_medians) C++14
5 / 100
36 ms 6204 KB
#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;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Incorrect 0 ms 300 KB Output isn't correct
3 Incorrect 1 ms 212 KB Output isn't correct
4 Incorrect 0 ms 212 KB Output isn't correct
5 Incorrect 1 ms 212 KB Output isn't correct
6 Correct 1 ms 300 KB Output is correct
7 Incorrect 0 ms 296 KB Output isn't correct
8 Incorrect 0 ms 300 KB Output isn't correct
9 Incorrect 0 ms 212 KB Output isn't correct
10 Incorrect 1 ms 212 KB Output isn't correct
11 Incorrect 1 ms 212 KB Output isn't correct
12 Incorrect 1 ms 340 KB Output isn't correct
13 Incorrect 1 ms 340 KB Output isn't correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Output isn't correct
2 Incorrect 2 ms 568 KB Output isn't correct
3 Incorrect 3 ms 784 KB Output isn't correct
4 Incorrect 6 ms 1332 KB Output isn't correct
5 Incorrect 11 ms 2144 KB Output isn't correct
6 Incorrect 22 ms 4004 KB Output isn't correct
7 Incorrect 36 ms 6204 KB Output isn't correct