链接:
https://ac.nowcoder.com/acm/contest/33192/D
来源:牛客网
Marisa wants to build an
n×mn \times mn×m rectangular swimming pool for Alice. To do this, Marisa can select four integral points on an infinite 2D-grid and cast magic. For example, the following picture shows three possible ways to build a
5×55 \times 55×5 swimming pool.
Marisa soon learns that there are many ways to build the pool since four sides of the pool can be non-parallel to coordinate axis. Here two ways are considered different if and only if the pool in one way can't be translated (moved without rotation and flipping) to the pool in the other way. Now Marisa becomes curious about the total numbers of complete
1×11 \times 11×1 squares inside the pool for all possible ways. As the result can be very large, you should print it modulo
998244353998\,244\,353998244353.