func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int t;     cin >> t;     while (t--) {       int n, i, mi, ma, x;       cin >> n;       int m[n + 1];       for (i = 1; i <= n; i++) {         cin >> x;         m[x] = i;       }       int a[n + 1];       a[1] = 1;       a[n] = 1;       mi = m[1];       ma = m[1];       for (i = 2; i < n; i++) {         mi = min(mi, m[i]);         ma = max(ma, m[i]);         if ((ma - mi) == i - 1) {           a[i] = 1;         } else {           a[i] = 0;         }       }       for (i = 1; i <= n; i++) {         cout << a[i];       }       cout << endl;     }   }   