| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 512 MB | 33 | 20 | 18 | 58.065% |
Consider strings consisting of the brackets '(' and ')'.
The regular bracket sequences are the strings which can be obtained by the following rules:
($A$) 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:
(' brackets in all $N$ boxes is equal to $M$.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円$.
2 2 1
4
1 1 1
0
24 120 30
379268651
For the first example, the following distributions meet the conditions:
(()), empty;()(), empty;(());()().So, the answer is 4ドル$.