Problem: You are the owner of a harvesting field which can be modeled as an infinite line, whose positions are identified by integers.
It will rain for the next days. On the -th day, the rain will be centered at position and it will have intensity . Due to these rains, some rainfall will accumulate; let be the amount of rainfall accumulated at integer position . Initially is , and it will increase by after the -th day's rain.
A flood will hit your field if, at any moment, there is a position with accumulated rainfall .
You can use a magical spell to erase exactly one day's rain, i.e., setting . For each from to , check whether in case of erasing the -th day's rain there is no flood.
Input Format: Each test contains multiple test cases. The first line contains the number of test cases (). The description of the test cases follows.
The first line of each test case contains two integers and (, ) — the number of rainy days and the maximal accumulated rainfall with no flood occurring.
Then lines follow. The -th of these lines contains two integers and () — the position and intensity of the -th day's rain.
The sum of over all test cases does not exceed .
Output Format: For each test case, output a binary string length of . The -th character of is 1 if after erasing the -th day's rain there is no flood, while it is 0, if after erasing the -th day's rain the flood still happens.
Note: In the first test case, if we do not use the spell, the accumulated rainfall distribution will be like this:
If we erase the third day's rain, the flood is avoided and the accumulated rainfall distribution looks like this:
In the second test case, since initially the flood will not happen, we can erase any day's rain.
In the third test case, there is no way to avoid the flood.