1748.
Color the chessboard
时间限制 1000 ms
内存限制 512 MB
There is a chessboard with $n$ rows and $m$ columns, at first every position is colored red or blue or white. HazelFan want to change the color of every white position into red one or blue one, so that every rectangle in the chessboard with even rows and even colums, contains same number of red positions and blue positions. HazelFan wants to know how many ways are there to color the chessboard, module $998244353$.
输入数据
输出数据
For each test case:
A single line contains a nonnegative integer, denoting the answer.
样例输入
复制
2
2 2
RB
??
3 3
???
?R?
???
\n
· \n
\n
\n
· \n
\n
\n
\n