# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
301951 | Arg_007 | List of Unique Integers (FXCUP4_unique) | C++17 | 0 ms | 0 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 <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define mp make_pair
#define PI ( acos(-1.0) )
#define FOR(i,a,b) for(i=a ; i<=b ; i++)
#define DBG printf("Hi\n")
#define i64 long long int
#define eps (1e-8)
#define xx first
#define yy second
#define ln 17
#define off 2
#define SZ(z) ((int)z.size())
#define MEM(a,x) memset(a,x,sizeof(a))
#define FastIO ios_base::sync_with_stdio(false); cin.tie(NULL)
using namespace __gnu_pbds;
using namespace std ;
typedef tree< i64, null_type, less<i64>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
#define IN freopen("262144.in","r",stdin)
#define OUT freopen("262144.out","w",stdout)
#define maxn 100005
#define INF 1000000000
#define mod 998244353LL
#define log 60
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#include "unique.h"
vector <int> PickUnique(int n)
{
vector<int> Left(n+2,0) , Right(n+2,0) ;
for(int i=1 ; i<=n ; i++)
{
Left[i] = UniqueCount(1,i) ;
Right[i] = UniqueCount(i,n) ;
}
vector <int> ans ;
for(int i=1 ; i<=n ; i++)
{
if( Left[i-1]==Left[i]-1 && Right[i+1]==Right[i]-1 ) ans.pb(i) ;
}
return ans ;
}
int main()
{
return 0 ;
}