#Lutece0513. Bitwise NOT

Bitwise NOT

Migrated from Lutece 513 Bitwise NOT

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

Bitwise NOT is a kind of bit operator, we defined that as follow: for a binary base number AA, let B=NOT AB=NOT\ A, then for each bit of BB, we can get its value by check the digit of corresponding position in AA . And for each digit, NOT 1=0NOT\ 1 = 0, NOT 0=1NOT\ 0 = 1. Normally, we simply write this operator as \sim, for example, for 44 bits number, 10=5\sim 10=5, 6=9\sim 6=9.

NOT is an amazing operator and this is a problem about NOT. Give you NN numbers with M bits, you can choose whether do NOT opration on each number, by doing this, you should minimize the difference between maximal number and the minimal number. Calculate the minimal difference.

Input

First line of the input is a single integer TT(T30T\leq 30), indicates there are TT test cases.

For each test case, the first line is two integers nn(1n1000001\leq n\leq 100000) and mm(1m601\leq m\leq 60), the number of numbers and the bits each number has. The second line contains nn integers in decimal base(each number is between 00 and 2m12^m-1).

Output

For each case, you should output Case #k: first, where kk indicates the case number between 11 and TT. Then output the minimum difference.

Samples

2
2 2
1 2
2 2
1 3
Case #1: 0
Case #2: 1

Note

  1. For example, consider that 10\sim 10 with 66 bits, that is 0010102=1101012\sim 001010_2=110101_2, so the result is 5353.
  2. Huge input, scanf is recommended.

Resources

elfness