| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 14 | 9 | 8 | 72.727% |
Given two positive integers $m$ and $n,ドル determine the value of the following formula modulo 998ドル,244円,353円$:
$$\sum_{i=0}^{\left\lfloor\frac{m}{2}\right\rfloor} \sum_{j=0}^{\left\lfloor\frac{n}{2}\right\rfloor} {i+j \choose j}^2{m+n-2i-2j \choose n-2j}\text{.}$$
Here, $a \choose b$ is a binomial coefficient (the number of ways to choose an unordered subset of $b$ items from a fixed set of $a$ items).
The first line contains one integer $T$ (1ドル \le T \le 10^5$) denoting the number of test cases.
For each test case, the input is a single line containing two integers $m$ and $n$ (1ドル \le m, n \le 10^5$).
For each test case, output one line containing one integer: the value of the formula modulo 998ドル,244円,353円$.
2 1 9 2 6
30 80