답안 #301971

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
301971 2020-09-18T10:42:06 Z Arg_007 List of Unique Integers (FXCUP4_unique) C++17
0 / 100
1 ms 256 KB
#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(1) ;
        else ans.pb(0) ;    }
    return ans ;
}
/*
int main()
{

    return 0 ;
}
*/
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 256 KB Wrong
2 Halted 0 ms 0 KB -