# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148951 | 요까할 로뭘 은명팀 (#200) | List of Unique Integers (FXCUP4_unique) | C++17 | 6 ms | 640 KiB |
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 "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;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |