func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 3e5 + 5;   int arr[maxn];   int main() {     int n;     scanf( %d , &n);     int pos = n;     cout << 1 << endl;     for (int i = 1; i <= n; i++) {       int tmp;       scanf( %d , &tmp);       arr[tmp] = 1;       while (arr[pos]) pos--;       printf(  %d , i - (n - pos) + 1);     }     cout << endl;     return 0;   }   