| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 149364 | Ragtag Volunteers (#200) | List of Unique Integers (FXCUP4_unique) | C++17 | 6 ms | 640 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "unique.h"
std::vector<std::vector<int> > mem;
int querry(int l, int r) {
if (r < l) return 0;
if (r == l) return 1;
int &res = mem[l][r];
if (res != -1) return res;
res = UniqueCount(l, r);
return res;
}
std::vector<int> PickUnique(int n) {
mem.assign(n, std::vector<int>(n, -1));
std::vector<int> res(n);
for (int i = 0; i < n; i++) {
const int del_l = querry(0, i) - querry(0, i - 1),
del_r = querry(i, n - 1) - querry(i + 1, n - 1);
res[i] = del_l == 1 and del_r == 1;
}
return res;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
