Super Greedy#3715

Super Greedy

1 second
64 megabytes
Easy

Two players are engaged in a game called "Greedy." There are piles, each containing a_i candies. The players take turns, and on each turn, they can remove any number of candies from to from any single pile. The player who removes the last candy from any pile loses the game. Determine how many different ways the first player can make their initial move to ensure a win, assuming both players play optimally.

Input

The first line contains the number of games (1 \le t \le 10^5). Each of the next lines describes a game with three values: (1 \le n \le 10^5), (1 \le k \le 10^9), followed by integers a_i (1 \le a_i \le 10^9) representing the number of candies in each pile.

It is guaranteed that the total number of piles across all games does not exceed 10^5.

Output

For each game, output the number of ways the first player can make their first move to guarantee a win, assuming both players play optimally. If the first player cannot win, output .

Examples

Example 1

Loading
Loading