func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXN = 3e5 + 5;   const int mod = 1e9 + 7;   int n;   int num[MAXN];   bool vis[MAXN];   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; ++i) scanf( %d , &num[i]);     int e = n;     printf( 1 );     int sum = 0;     for (int i = 1; i <= n; ++i) {       vis[num[i]] = 1;       while (vis[e] && e >= 1) {         sum++;         e--;       }       printf(  %d , i - sum + 1);     }     return 0;   }   