func_code_string: #include <bits/stdc++.h>   using namespace std;   int a[300001];   int m, n, res = 1, x;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     cin >> n;     m = n;     printf( 1  );     for (int i = 1; i <= n; ++i) {       cin >> x;       a[x] = 1;       res++;       while (a[m] == 1 && m > 0) {         res--;         m--;       }       printf( %d  , res);     }     return 0;   }   