func_code_string: #include <bits/stdc++.h>   using namespace std;   inline int read() {     int l = 0, f = 1;     char a = getchar();     for (; a <  0  || a >  9 ; a = getchar())       if (a ==  - ) f = -1;     for (; a >=  0  && a <=  9 ; a = getchar()) l = l * 10 + a - 48;     return l * f;   }   const int N = 300005;   int n, ans = 1, last, a[N];   int main(int argc, char const *argv[]) {     n = read();     last = n;     printf( 1  );     for (int i = 1; i <= n; ++i) {       int x = read();       a[x] = 1, ans++;       while (a[last]) --last, --ans;       printf( %d  , ans);     }     return 0;   }   