#include <bits/stdc++.h>
using namespace std;
long long pre[200005];
int pos[200005];
int a[200005];
signed main() {
  ;
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(10);
  int t = 1;
  cin >> t;
  memset(pre, 0, sizeof(pre));
  while (t--) {
    int n;
    cin >> n;
    pre[0] = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      pos[a[i]] = i;
      pre[i + 1] = pre[i] + (long long)a[i];
    }
    int rp = 0, lp = 200005;
    string ans = "1";
    lp = pos[1];
    rp = pos[1];
    for (int i = 2; i <= n; i++) {
      long long s = (long long)i * (i + 1);
      s /= (long long)2;
      if (pos[i] > rp)
        rp = pos[i];
      else if (pos[i] < lp)
        lp = pos[i];
      if ((pre[rp + 1] - pre[lp]) == s) {
        ans += "1";
      } else
        ans += "0";
    }
    cout << ans << "\n";
  };
}
