# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
149143 | TLEWA맞 (#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"
#include <bits/stdc++.h>
using namespace std;
vector<int> arr;
int ldp[203],rdp[203];
std::vector<int> PickUnique(int n)
{
for(int i=0;i<n;i++)
{
ldp[i]=UniqueCount(0,i);
rdp[i]=UniqueCount(i,n-1);
} if(ldp[n-1]-ldp[n-2]==1) arr[n-1]=1;
if(rdp[0]-rdp[1]==1) arr[0]=1;
for(int i=1;i<n-1;i++)
{
if(ldp[i]-ldp[i-1]==1&&rdp[i]-rdp[i+1]==1) arr[i]=1;
} return arr;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |