시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB41272477.419%

문제

$N$ crystals are aligned in a row. However, some of them may be phantoms.

Jun counted the number of real crystals from $l$-th to $r$-th (closed interval) for every $l$, $r$ ($1 \le l \le r \le N$) pair and recorded their evenness.

His $\frac{N(N+1)}{2}$ records show that there were $k$ intervals that contained an odd number of real crystals. How many possible crystal alignments are there? Answer the remainder divided by $998244353$.

Note that if there is $i$ such that the $i$-th crystal from the left is real on one side and phantom on the other, the two alignments are considered different.

You are given $T$ of the above problems. Answer each of them.

입력

$T$

$N_1$ $K_1$

$\vdots$

$N_T$ $K_T$

출력

Output $T$ lines. On the line $i$, answer the problem when $N = N_i$, $K = K_i$. Add a new line at the end of each line.

제한

  • All inputs consist of integers.
  • $1 \le T \le 10^5$
  • $1 \le N_i \le 10^5$
  • $0 \le K_i \le \frac{N_i(N_i+1)}{2}$

예제 입력 1

1
3 4

예제 출력 1

3

예제 입력 2

5
5 9
6 10
10 24
10 25
100000 75915540

예제 출력 2

10
21
165
0
651081880

힌트

If we denote a real crystal as $1$ and an phantom as $0$, the following three alignments satisfy the condition at Sample Input 1.

  • $0, 1, 0$
  • $1, 0, 1$
  • $1, 1, 1$