#P1851F. Lisa and the Martians
Lisa and the Martians
No submission language available for this problem.
Description
Lisa was kidnapped by martians! It okay, because she has watched a lot of TV shows about aliens, so she knows what awaits her. Let's call integer martian if it is a non-negative integer and strictly less than , for example, when , the numbers , , are martian, and the numbers , , , are not.
The aliens will give Lisa martian numbers . Then they will ask her to name any martian number . After that, Lisa will select a pair of numbers () in the given sequence and count . The operation means Bitwise exclusive OR, the operation means Bitwise And. For example, .
Lisa is sure that the higher the calculated value, the higher her chances of returning home. Help the girl choose such that maximize the calculated value.
The first line contains an integer () — number of testcases.
Each testcase is described by two lines.
The first line contains integers (, ) — the length of the sequence of martian numbers and the value of .
The second line contains integers () — a sequence of martian numbers.
It is guaranteed that the sum of over all testcases does not exceed .
For each testcase, print three integers (, , ). The value of should be the maximum possible.
If there are several solutions, you can print any one.
Input
The first line contains an integer () — number of testcases.
Each testcase is described by two lines.
The first line contains integers (, ) — the length of the sequence of martian numbers and the value of .
The second line contains integers () — a sequence of martian numbers.
It is guaranteed that the sum of over all testcases does not exceed .
Output
For each testcase, print three integers (, , ). The value of should be the maximum possible.
If there are several solutions, you can print any one.
Note
First testcase: .
Second testcase: .
Third testcase: .
Fourth testcase: .