#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);
a[0][i] = UniqueCount(0,i);
a[i][n-1] = UniqueCount(i,n-1);
}
int l = 1;
for(int i = 1;i < n;i++)
{
x = a[0][i];
if(l == x+1) ans[i] = 0;
if(l == x) ans[i] = 0;
l = x;
}
l = 1;
for(int i = n-2;i >= 0;i--)
{
x = a[i][n-1];
if(l == x+1) ans[i] = 0;
if(l == x) ans[i] = 0;
l = x;
}
//for(int i : ans) cout << i << " ";
//cout << "\n";
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
384 KB |
Correct : C = 4 |
2 |
Correct |
6 ms |
384 KB |
Correct : C = 10 |
3 |
Correct |
6 ms |
384 KB |
Correct : C = 50 |
4 |
Correct |
5 ms |
384 KB |
Correct : C = 100 |
5 |
Correct |
6 ms |
384 KB |
Correct : C = 100 |
6 |
Correct |
5 ms |
512 KB |
Correct : C = 154 |
7 |
Correct |
5 ms |
512 KB |
Correct : C = 200 |
8 |
Correct |
6 ms |
640 KB |
Correct : C = 300 |
9 |
Correct |
5 ms |
640 KB |
Correct : C = 356 |
10 |
Correct |
5 ms |
640 KB |
Correct : C = 400 |
11 |
Correct |
6 ms |
640 KB |
Correct : C = 400 |
12 |
Correct |
5 ms |
640 KB |
Correct : C = 400 |
13 |
Correct |
6 ms |
640 KB |
Correct : C = 400 |
14 |
Correct |
6 ms |
640 KB |
Correct : C = 400 |
15 |
Correct |
6 ms |
640 KB |
Correct : C = 400 |