A sequence b1,b2,…,bk is called good if and only if:
- k≥3
- For every index i with 3≤i≤k, the following holds:
bi=b2+∑j=1i−2bj
You are given an array a of length n.
Among all 2n subsequences of array a, compute the number of good subsequences modulo 998244353.
Constraints
- 1≤t≤100
- 1≤n≤1000
- 1≤ai≤109
- The sum of n over all test cases does not exceed 1000.