Chef has an array A consisting of N integers. He also has an intger K.
Chef wants you to find out number of different arrays he can obtain from array A by applying the following operation exactly K times.

- Pick some element in the array and multiply it by -1

As answer could be quite large, print it modulo 109 + 7.

-----Input-----
- The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
- The first line of each test case contains two space separated integers N, K as defined above.
- The second line contains N space-separated integers A1, A2, ..., AN denoting the elements of the array.

-----Output-----
- For each test case, output a single line containing an integer corresponding to the number of different arrays Chef can get modulo 109 + 7.

-----Constraints-----
- 1 ≤ T ≤ 10
- 1 ≤ N, K ≤ 105
- -106 ≤ Ai ≤ 106

-----Subtasks-----
- Subtask #1 (10 points) : N, K ≤ 10
- Subtask #2 (30 points) : N, K ≤ 100
- Subtask #3 (60 points) : N, K ≤ 105

-----Example-----
Input:
3
1 3
100
3 1
1 2 1
3 2
1 2 1

Output:
1
3
4

-----Explanation-----
Example case 1.
Chef has only one element and must apply the operation 3 times to it. After applying the operations, he will end up with -100. That is the only array he will get.

Example case 2.
Chef can apply operation to one of three elements. So, he can obtain three different arrays.

Example case 3.
Note that other than applying operation to positions (1, 2), (1, 3), (2, 3), Chef can also apply the operation twice on some element and get the original.

In summary, Chef can get following four arrays.

[1, 2, 1]
[-1, -2, 1]
[-1, 2, -1]
[1, -2, -1]

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'import sys\n\ndef fun(n,x):\n res = 1\n for i in range(n, x,-1):\n  res = (res*i) % 1000000007\n return res\n\ndef degree(a,k):\n res = 1\n cur = a\n while(k):\n  if (k % 2):\n   res = (res * cur) % 1000000007\n  k /= 2\n  cur = (cur * cur) % 1000000007\n return res\n \ndef inv_fun(k):\n denom = 1\n for x in range(1, k+1, 1):\n  ti = x;\n  while(ti%1000000007 == 0):\n   ti /= 1000000007\n  denom = (denom*ti) % 1000000007\n denom = degree(denom, 1000000005) % 1000000007\n return denom\n  \ndef nCr(n,r):\n return fun(n,n-r)*inv_fun(r)\n\nT = int(input())\n\nfor x in range(T):\n N, K = [int(y) for y in input().split(" ")]\n array = [int(t) for t in input().split(" ")]\n count = 0\n for i in range(len(array)):\n  if(array[i] == 0):\n   count += 1\n K = min(N,K)\n if count != 0:\n  sum = 0\n  for j in range(0,min(N-count,K)+1):\n   sum += nCr(N-count,j)\n   \n elif K%2 == 0:\n  sum = 0\n  for j in range(0,K+1,2):\n   sum += nCr(N,j)\n else:\n  sum = 0\n  for j in range(1,K+1,2):\n   sum += nCr(N,j)%1000000007\n print(sum%1000000007)'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14033