Problem: On the competitive programming platform CodeCook, every person has a rating graph described by an array of integers of length . You are now updating the infrastructure, so you've created a program to compress these graphs.
The program works as follows. Given an integer parameter , the program takes the minimum of each contiguous subarray of length in .
More formally, for an array of length and an integer , define the -compression array of as an array of length , such that
For example, the -compression array of is
A permutation of length is an array consisting of distinct integers from to in arbitrary order. For example, is a permutation, but is not a permutation ( appears twice in the array) and is also not a permutation ( but there is in the array).
A -compression array will make CodeCook users happy if it will be a permutation. Given an array , determine for all if CodeCook users will be happy after a -compression of this array or not.
Input Format: The first line contains a single integer () — the number of test cases.
The first line of the description of each test case contains a single integer () — the length of the array.
The second line of the description of each test case contains integers () — the elements of the array.
It is guaranteed, that the sum of for all test cases does not exceed .
Output Format: For each test case, print a binary string of length .
The -th character of the string should be if CodeCook users will be happy after a -compression of the array , and otherwise.
Note: In the first test case, .
- The -compression of is and it is a permutation.
- The -compression of is and it is not a permutation, since appears twice.
- The -compression of is and it is a permutation.
- The -compression of is and it is a permutation.
- The -compression of is and it is a permutation.