# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
247100 | lyc | List of Unique Integers (FXCUP4_unique) | C++17 | 6 ms | 512 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;
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
const int mxN = 205;
int pre[mxN], suf[mxN];
std::vector<int> PickUnique(int N) {
FOR(i,0,N-1){
pre[i] = UniqueCount(0,i);
suf[N-1-i] = UniqueCount(N-1-i,N-1);
}
vector<int> ans(N);
FOR(i,0,N-1){
ans[i] = (i == 0 ? 1 : (pre[i]>pre[i-1])) && (i == N-1 ? 1 : (suf[i]>suf[i+1]));
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |