# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
379247 | huangqr | List of Unique Integers (FXCUP4_unique) | C++17 | 1 ms | 492 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;
typedef long long ll;
std::vector<int> PickUnique(int N) {
vector<int>v;
for(int i=0;i<N;i++)v.push_back(1);
ll pre=0;
for(int i=0;i<N;i++){
ll cur=UniqueCount(0,i);
v[i]&=max(cur-pre,0ll);
pre=cur;
}
pre=0;
for(int i=N-1;i>=0;i--){
ll cur=UniqueCount(i,N-1);
v[i]&=max(cur-pre,0ll);
pre=cur;
}
return v;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |