답안 #148951

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
148951 2019-09-01T05:27:03 Z 요까할 로뭘 은명팀(#3558, mario05092929, foja001, earthk) List of Unique Integers (FXCUP4_unique) C++17
35 / 100
6 ms 640 KB
#include "unique.h"
#include <bits/stdc++.h>
using namespace std;
int a[205][205],x;

vector<int> PickUnique(int n)
{
    vector <int> ans;
    for(int i = 0;i < n;i++)
    {
        ans.push_back(1);
        for(int j = i+1;j < n;j++)
        {
            a[i][j] = UniqueCount(i,j);
            a[j][i] = a[i][j];
        }
    }
    for(int i = 0;i < n;i++)
    {
        int l = 1;
        for(int j = i+1;j < n;j++)
        {
            x = a[i][j];
            if(l == x+1) ans[j] = 0;
            if(l == x) ans[j] = 0;
            l = x;
        }
    }
    for(int i = n-1;i >= 0;i--)
    {
        int l = 1;
        for(int j = i-1;j >= 0;j--)
        {
            x = a[i][j];
            if(l == x+1) ans[j] = 0;
            if(l == x) ans[j] = 0;
            l = x;
        }
    }
    //for(int i : ans) cout << i << " ";
    //cout << "\n";
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Correct : C = 1
2 Correct 5 ms 384 KB Correct : C = 10
3 Correct 5 ms 384 KB Correct : C = 300
4 Partially correct 6 ms 384 KB Partially correct : C = 1225
5 Partially correct 5 ms 384 KB Partially correct : C = 1225
6 Partially correct 5 ms 512 KB Partially correct : C = 2926
7 Partially correct 5 ms 512 KB Partially correct : C = 4950
8 Partially correct 6 ms 512 KB Partially correct : C = 11175
9 Partially correct 6 ms 640 KB Partially correct : C = 15753
10 Partially correct 6 ms 640 KB Partially correct : C = 19900
11 Partially correct 5 ms 640 KB Partially correct : C = 19900
12 Partially correct 6 ms 640 KB Partially correct : C = 19900
13 Partially correct 6 ms 512 KB Partially correct : C = 19900
14 Partially correct 6 ms 640 KB Partially correct : C = 19900
15 Partially correct 6 ms 640 KB Partially correct : C = 19900