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

23452번 - Black and White 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 256 MB85571.429%

문제

Master Pang walks from the bottom-left corner of a $n\times m$ chessboard to the top-right corner. The chessboard contains $n+1$ horizontal line segments and $m+1$ vertical line segments. The horizontal line segments are numbered from 0ドル$ to $n$ from bottom to top and the vertical ones are numbered from 0ドル$ to $m$ from left to right. The intersection of horizontal line segment $r$ and vertical segment $c$ is denoted by $(r,c)$. The bottom-left corner is $(0, 0)$ and the top-right corner is $(n, m)$. At each step, he can only walk from $(x, y)$ to $(x, y+1)$ or from $(x, y)$ to $(x + 1, y)$.

Each of the $n\times m$ cells is colored white or black. A cell with corners $(i,j), (i+1,j), (i,j+1), (i+1,j+1)$ $(0\le i<n, 0\le j<m)$ is colored white if and only if $i\equiv j\pmod 2$.

Given $Pang$'s walking path from $(0, 0)$ to $(n, m),ドル his score is $a-b$ where $a$ is the number of white cells to the left of his walking path and $b$ is the number of black cells to the left of his walking path.

Help Master Pang count the number of walking paths with score $k$ modulo 998244353ドル$.

입력

The first line contains a single integer $T$ --- the number of test cases (1ドル\le T \le 100$).

Each of the next $T$ lines contains three integers $n,ドル $m$ and $k$ (1ドル\le n\le 100000, 1\le m\le 100000, -100000\le k\le 100000$).

출력

For each test case, output a single integer --- the answer modulo 998244353ドル$.

제한

예제 입력 1

5
1 1 0
1 1 -1
2 2 1
2 2 0
4 4 1

예제 출력 1

1
0
1
4
16

힌트

출처

Contest > Open Cup > 2019/2020 Season > Stage 10: Grand Prix of Xi’An B번

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

출처

대학교 대회

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

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