Score : 600 points
We have a grid with A horizontal rows and B vertical columns, with the squares painted white. On this grid, we will repeatedly apply the following operation:
Assume the grid eventually has C horizontal rows and D vertical columns. Find the number of ways in which the squares can be painted in the end, modulo 998244353.
Input is given from Standard Input in the following format:
A B C D
Print the number of ways in which the squares can be painted in the end, modulo 998244353.
1 1 2 2
3
Any two of the three squares other than the bottom-left square can be painted black.
2 1 3 4
65
31 41 59 265
387222020