func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 3e+5;   bool vis[maxn];   int main() {     int T, n, m, l;     cin.sync_with_stdio(false);     cout.sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     while (cin >> n) {       memset(vis, false, sizeof vis);       int pos = n;       int now = 0;       cout <<  1  ;       for (int i = 0; i < n; i++) {         int x;         cin >> x;         now++;         vis[x] = true;         while (vis[pos]) {           pos--;           now--;         }         cout << now + 1 <<    ;       }       cout << endl;     }     return 0;   }   