# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148801 | 준표야 함수컵은 캐리해줄거지? (#200) | List of Unique Integers (FXCUP4_unique) | C++17 | 5 ms | 256 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"
using namespace std;
std::vector<int> PickUnique(int N) {
int tot = UniqueCount(0, N - 1);
vector<int> ret(N, 1);
for(int i = 0, cur = tot; i < N - 1; i++){
int cnt = UniqueCount(i + 1, N - 1);
if(cnt == cur) ret[i] = false;
else cur--;
}
for(int i = N - 1, cur = tot; i > 0; i--){
int cnt = UniqueCount(0, i - 1);
if(cnt == cur) ret[i] = false;
else cur--;
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |