For this Question: While Solo was playing with an array A of N integers, her little sister Tono asked her the following question:
For each integer i from 1 to N, find the smallest non- negative integer that is missing in subarray A[0]...A[i-1].

As Solo wants to play, please help her solve the following problem.The first line of the input contains a single integer N.
The second line of input contains N space-separated integers, the integers of the array A.

Constraints
1 <= N <= 200000
0 <= A[i] <= 200000Output N integers, the answers for each index <b>i</b> in a new line.Sample Input
4
1 1 0 2

Sample Output
0
0
2
3

Explanation:
For i=1, subarray = [1], smallest non negative missing integer = 0.
For i=2, subarray = [1, 1], smallest non negative missing integer = 0.
For i=3, subarray = [1, 1, 0], smallest non negative missing integer = 2.
For i=4, subarray = [1, 1, 0, 2], smallest non negative missing integer = 3.

Sample Input
10
5 4 3 2 1 0 7 7 6 6

Sample Output
0
0
0
0
0
6
6
6
8
8, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define sd(x) scanf("%d", &x)
#define sz(v) (int) v.size()
#define pr(v) For(i, 0, sz(v)) {cout<<v[i]<<" ";} cout<<endl;
#define slld(x) scanf("%lld", &x)
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(int i=st; i<en; i++)
#define tr(x) for(auto it=x.begin(); it!=x.end(); it++)
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define ll long long
#define ld long double
#define int long long
#define double long double
#define mp make_pair
#define F first
#define S second
typedef pair<int, int> pii;
typedef vector<int> vi;
#define pi 3.141592653589793238
const int MOD = 1e9+7;
const int INF = 1LL<<60;


const int N = 2e5+5;

// it's swapnil07 ;)
 
#ifdef SWAPNIL07
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
int begtime = clock();
#define end_routine() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif


void solve(){
    int cur = 0;
    set<int> s;
    int n; cin>>n;
    For(i, 0, n){
        int a; cin>>a;
        s.insert(a);
        while(s.find(cur)!=s.end())
            cur++;
        cout<<cur<<"\n";
    }
}


signed main()
{
    fast
    #ifdef SWAPNIL07
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    int t=1; 
    // cin>>t;
    while(t--){
        solve();
        // cout<<"\n";
    }
    return 0;
}

, In this Programming Language: C++, Now tell me if this Code is compilable or not?