#arc173f. F - Select and Split

F - Select and Split

Score: 12001200 points

问题陈述

黑板上写着一组正整数。最初,黑板上写着集合 ( S={1,2,\dots,A,A+1,A+2,\dots,A+B} )。

高桥想要执行以下操作 ( N-1 ) 次,以便在黑板上得到 ( N ) 个集合:

  • 从黑板上写的整数集合中,选择一个集合 ( S_0 ),该集合至少包含一个不超过 ( A ) 的元素,并且至少包含一个不少于 ( A+1 ) 的元素。从选定的集合 ( S_0 ) 中,选择一个不超过 ( A ) 的元素 ( a ) 和一个不少于 ( A+1 ) 的元素 ( b )。从黑板上擦掉集合 ( S_0 ) 并写下两个集合 ( S_1 ) 和 ( S_2 ),这两个集合由他选择,并且满足以下所有条件:
    • ( S_1 ) 和 ( S_2 ) 的并集是 ( S_0 ),并且它们没有共同元素。
    • ( a \in S_1, b \in S_2 )

找出执行一系列操作的可能方式的数量,对 ( 998244353 ) 取模。

在这里,当存在 ( i\ (1 \leq i \leq N-1) ) 使得一个系列中 ( i ) 次操作选择的 ( S_0 ),( a ),( b ),( S_1 ) 或 ( S_2 ) 与另一个系列中的不同,则认为两个操作系列是不同的。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

There is a blackboard with a set of positive integers written on it. Initially, the set S={1,2,,A,A+1,A+2,,A+B}S=\lbrace 1,2,\dots,A,A+1,A+2,\dots,A+B\rbrace is written on the blackboard.

Takahashi wants to perform the following operation N1N-1 times to have NN sets on the blackboard:

  • From the sets of integers written on the blackboard, choose a set S0S_0 that contains at least one element not greater than AA and at least one element not less than A+1A+1. From the chosen set S0S_0, choose one element aa not greater than AA and one element bb not less than A+1A+1. Erase the set S0S_0 from the blackboard and write two sets S1S_1 and S2S_2 of his choice that satisfy all of the following conditions:
    • The union of S1S_1 and S2S_2 is S0S_0, and they have no common elements.
    • aS1,bS2a \in S_1, b \in S_2

Find the number of possible ways to perform the series of operations, modulo 998244353998244353.

Here, two series of operations are distinguished when there is an i (1iN1)i\ (1 \leq i \leq N-1) such that S0S_0, aa, bb, S1S_1, or S2S_2 chosen in the ii-th operation of one series is different from that of the other series.

Constraints

  • 2N2×1052 \leq N \leq 2 \times 10^5
  • 1A,B2×1051 \leq A,B \leq 2 \times 10^5
  • NA+BN \leq A+B
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

NN AA BB

Output

Print the answer.

Sample Input 1

3 2 4

Sample Output 1

1728

One possible series of operations is as follows:

  • Choose S0={1,2,3,4,5,6}S_0=\lbrace 1,2,3,4,5,6\rbrace, let a=2a=2 and b=5b=5, and let S1={1,2,3,6}S_1 =\lbrace 1,2,3,6\rbrace and S2={4,5}S_2=\lbrace 4,5\rbrace. There are now two sets of integers written on the blackboard: {1,2,3,6}\lbrace 1,2,3,6\rbrace and {4,5}\lbrace 4,5\rbrace.
  • Choose S0={1,2,3,6}S_0=\lbrace 1,2,3,6\rbrace, let a=1a=1 and b=3b=3, and let S1={1,2}S_1 = \lbrace1,2\rbrace and S2={3,6}S_2=\lbrace 3,6\rbrace. There are now three sets of integers written on the blackboard: {1,2}\lbrace 1,2\rbrace, {3,6}\lbrace 3,6\rbrace, and {4,5}\lbrace 4,5\rbrace.

Sample Input 2

4 1 3

Sample Output 2

6

If we let a=1a=1 and b=2b=2 and let S1={1}S_1 = \lbrace 1\rbrace and S2={2,3,4}S_2 = \lbrace 2,3,4\rbrace in the first operation, we can no longer perform the second and subsequent operations.

Do not count these cases where we cannot complete N1N-1 operations.

Sample Input 3

5 6 6

Sample Output 3

84486693

Sample Input 4

173173 173173 173173

Sample Output 4

446948086