Logo
(追記) (追記ここまで)

33452번 - Simple Math Problem 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB149872.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円$.

제한

예제 입력 1

2
1 9
2 6

예제 출력 1

30
80

힌트

출처

Camp > Petrozavodsk Programming Camp > Winter 2024 > Day 4: Peking U Contest 2 M번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /