| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 2048 MB | 152 | 118 | 101 | 78.906% |
Eddy is planning his garden, which can be represented as a grid. He wants his garden to have exactly one plant in each column. To make sure that plants do not compete for resources, if two plants are in adjacent columns, they must be in different rows.
Compute the number of different ways he can place plants in his garden to respect the above conditions. Two ways are different if one square has a plant in one arrangement but does not have a plant in the other. Because the number of ways may be large, output the number of ways modulo 998ドル,244円,353円$.
The single line of input contains two space-separated integers $r$ and $c$ $(1 \leq r,c\leq 50),ドル where $r$ is the number of rows in Eddy's garden grid, and $c$ is the number of columns.
Output a single integer, which is the number of ways Eddy can place plants in his garden, modulo 998ドル,244円,353円$.
3 2
6
1 5
0
42 25
722210361
ICPC > Regionals > North America > Mid-Central Regional > 2023 Mid-Central USA Programming Contest A번
ICPC > Regionals > North America > South Central USA Regional > 2023 South Central USA Regional Contest > Division 2 G번
ICPC > Regionals > North America > Mid-Atlantic Regional > 2023 Mid-Atlantic USA Regional Contest > Division 2 G번
ICPC > Regionals > North America > Southeast USA Regional > 2023 Southeast USA Regional Programming Contest > Division 2 G번