#K60052. Ingredient Evaluation Competition

    ID: 31000 Type: Default 1000ms 256MiB

Ingredient Evaluation Competition

Ingredient Evaluation Competition

In this competition problem, participants must use a minimum number of different ingredients to pass the evaluation. For each test case, you are given the number of participants, an unused parameter (the total number of ingredients available), and the threshold number of ingredients required to pass. For each participant, if the number of different ingredients they used is at least \( R \), they pass (represented by 1); otherwise, they fail (represented by 0).

The input begins with an integer \( T \) representing the number of test cases. Each test case consists of two lines: the first line contains three integers \( N \), \( K \), and \( R \) (where \( K \) is provided but is not used in the evaluation), and the second line contains \( N \) space-separated integers representing the number of ingredients used by each participant.

The output for each test case should contain a single line with \( N \) space-separated integers where each integer is either 0 (for a fail) or 1 (for a pass), according to whether the corresponding participant meets or exceeds the threshold \( R \).

inputFormat

The input is provided via stdin with the following format:

T
N1 K1 R1
A1,1 A1,2 ... A1,N1
N2 K2 R2
A2,1 A2,2 ... A2,N2
...

Where \( T \) is the number of test cases. For each test case, the first line contains three integers: \( N \) (number of participants), \( K \) (total number of ingredients available, which is not used in the logic), and \( R \) (minimum ingredients required to pass). The following line contains \( N \) integers representing the number of ingredients used by each participant.

outputFormat

The output should be printed on stdout with the following format:

result1
result2
...
resultT

Each result line corresponds to one test case and contains \( N \) binary integers (0 or 1) separated by spaces. A value of 1 indicates that the participant passed (used at least \( R \) different ingredients), and a value of 0 indicates that the participant failed.

## sample
3
3 5 3
2 4 5
4 8 6
5 6 8 7
2 10 2
1 2
0 1 1

0 1 1 1 0 1

</p>