# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
151628 | thebes | List of Unique Integers (FXCUP4_unique) | C++17 | 3 ms | 548 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 <bits/stdc++.h>
#include "unique.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
#define pb push_back
vi PickUnique(int N){
vi res;
for(int i=0;i<N;i++)
res.pb(1);
int p = 0;
for(int i=0;i<N;i++){
int u = UniqueCount(0,i);
if(u!=p+1) res[i]=0;
p = u;
}
p = 0;
for(int i=N-1;i>=0;i--){
int u = UniqueCount(i,N-1);
if(u!=p+1) res[i]=0;
p = u;
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |