P20617 [HackerEarth] Chacha bought a new game for you, its called Graph. In the game you are given N number of vertices and an N * N matrix M whose (i,j)^th cell denotes the cost of constructing a bidirectio
普及-
题目描述

Chacha bought a new game for you, its called Graph. In the game you are given N number of vertices and an N * N matrix M whose (i,j)^th cell denotes the cost of constructing a bidirectional edge between i and j. It is assured that M[i][j]=M[j][i] and M[i][i]=0 for all $i,j \epsilon {1, 2, 3, ... N}.$ Now you have to choose a subset , S, of vertices and make edges between them such that from every vertex in S you can reach to every other vertex in S. But the total cost of constructing the edges should not be more than W. Now for given N, W, and M you have to print the maximum possible size of S.

Input:
First line consists of T denoting the number of test cases.
First line of each test case consists of two space separated integers denoting N and W. Then follow N lines containing N space separated integers denoting the matrix M.

Output:
Print the answer in a new line for each test case.

Constraints:
1 ≤ T ≤ 10
1 ≤ N ≤ 16
1 ≤ W, M[i][j] ≤ $1500 \forall i, j \epsilon {1, 2, 3,...N}$

SAMPLE INPUT
1
3 7
0 1 2
1 0 2
2 2 0

SAMPLE OUTPUT
3

输入格式

见题面

输出格式

见题面

样例输入
5 6 99 0 663 355 430 798 436 663 0 444 622 684 797 355 444 0 877 682 803 430 622 877 0 590 430 798 684 682 590 0 524 436 797 803 430 524 0 5 1106 0 201 542 741 72 201 0 172 975 213 542 172 0 291 252 741 975 291 0 964 72 213 252 964 0 2 322 0 470 470 0 2 136 0 825 825 0 6 934 0 260 185 855 296 981 260 0 731 329 135 673 185 731 0 758 659 418 855 329 758 0 363 211 296 135 659 363 0 959 981 673 418 211 959 0
样例输出
10 10 11 14 10 8 11 16 14 7