There is a pool that can be modeled as a rectangular grid with width
A safe area for swimming shall satisfy the following constraints:
- All cells in the pool are safe.
- Must be rectangular.
- Must be adjacent to the bottom edge (i.e. the beach).
Given that each square cell of
Input Specification
Input a line with four positive integers
Output Specification
Output a line with an integer denoting the answer modulo 998244353: if the answer is
Input
Copy
10 5 1 2
Output
Copy
342025319
Hint
Constraints
Test case | ||
---|---|---|
1,2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9,10,11 | ||
12,13,14 | ||
15,16 | ||
17,18 | ||
19,20 |
Comments