#include <bits/stdc++.h>
#include "unique.h"
using namespace std;
vector <int> PickUnique(int N){
vector <int> res;
for(int i = 0; i < N; i++){
res.push_back(1);
}
int cur, prev = 1;
for(int i = 1; i < N; i++){
cur = UniqueCount(0, i);
if(cur <= prev){
res[i] = 0;
}
}
prev = 1;
for(int i = N - 2; i >= 0; i--){
cur = UniqueCount(i, N - 1);
if(cur <= prev){
res[i] = 0;
}
}
return res;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
256 KB |
Correct : C = 2 |
2 |
Incorrect |
4 ms |
384 KB |
Wrong |
3 |
Halted |
0 ms |
0 KB |
- |