#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include "unique.h"
#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());
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(0,i-1) ;
Right[i] = UniqueCount(i-1,n-1) ;
}
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-1) ;
}
return ans ;
}
/*
int main()
{
return 0 ;
}
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
Wrong |
2 |
Halted |
0 ms |
0 KB |
- |