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

23115번 - Multiple Parentheses 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB33201858.065%

문제

Consider strings consisting of the brackets '(' and ')'.

The regular bracket sequences are the strings which can be obtained by the following rules:

  • Empty string is a regular bracket sequence.
  • If $A$ is a regular bracket sequence, then ($A$) is a regular bracket sequence.
  • If $A$ and $B$ are regular bracket sequences, then the concatenation of $A$ and $B$ is a regular bracket sequence.

You are given $N$ boxes numbered 1,ドル 2, \ldots, N,ドル and also two integers, $M$ and $K$. Your task is to put exactly one regular bracket sequence in each of $N$ boxes such that the following conditions are met:

  • The total number of '(' brackets in all $N$ boxes is equal to $M$.
  • The regular bracket sequences of length 2ドル \cdot K$ cannot be put into the boxes.

Count the number of different ways to do that. Two distributions are considered different if there exists a number $i$ such that box $i$ contains different regular bracket sequences in those distributions.

Because the answer may be very large, print the answer modulo 998ドル,244円,353円$.

입력

The input contains one line with three integers $N,ドル $M,ドル and $K$ in it (1ドル \le M, N \le 10^6,ドル 1ドル \le K \le M$).

출력

Print the answer modulo 998ドル,244円,353円$.

제한

예제 입력 1

2 2 1

예제 출력 1

4

예제 입력 2

1 1 1

예제 출력 2

0

예제 입력 3

24 120 30

예제 출력 3

379268651

힌트

For the first example, the following distributions meet the conditions:

  • (()), empty;
  • ()(), empty;
  • empty, (());
  • empty, ()().

So, the answer is 4ドル$.

출처

Camp > Petrozavodsk Programming Camp > Summer 2021 > Day 1: Kyoto U Contest 1 M번

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

출처

대학교 대회

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

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