func_code_string: #include <bits/stdc++.h>   using namespace std;   using i64 = int64_t;   using i32 = int32_t;   template <class T, class U>   void init_n(vector<T>& v, size_t n, U x) {     v = vector<T>(n, x);   }   template <class T>   void init_n(vector<T>& v, size_t n) {     init_n(v, n, T());   }   template <class T>   void read_n(vector<T>& v, size_t n, size_t o = 0) {     v = vector<T>(n + o);     for (size_t i = o; i < n + o; ++i) cin >> v[i];   }   template <class T>   void read_n(T a[], size_t n, size_t o = 0) {     for (size_t i = o; i < n + o; ++i) cin >> a[i];   }   template <class T>   T gabs(const T& x) {     return max(x, -x);   }   void solve() {     int n;     cin >> n;     vector<int> p(n + 1);     vector<int> q(n + 1);     for (int i = 1; i <= n; ++i) {       cin >> p[i];       q[p[i]] = i;     }     string res(n,  0 );     res[0] =  1 ;     for (int i = 2, l = q[1], r = q[1]; i <= n; ++i) {       l = min(l, q[i]);       r = max(r, q[i]);       if (i == r - l + 1) res[i - 1] =  1 ;     }     cout << res <<   n ;   }   int q;   int main() {     cin >> q;     while (q--) {       solve();     }     return 0;   }   