結果
| 問題 | No.2802 Pill Bug in Grid Maze |
| ユーザー |
|
| 提出日時 | 2023-10-19 07:55:59 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 274 bytes |
| 記録 | |
| コンパイル時間 | 403 ms |
| コンパイル使用メモリ | 85,448 KB |
| 実行使用メモリ | 90,236 KB |
| 最終ジャッジ日時 | 2026-03-30 09:57:35 |
| 合計ジャッジ時間 | 4,217 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 TLE * 1 -- * 26 |
ソースコード
from math import comb H, W = map(int, input().split()) if H == 1 or W == 1: exit(print(1)) mod = 998244353 ans = 0 for i in range(H + W - 2): x = i // 2 y = i // 2 + i % 2 ans += pow(2, (H - 1) * (W - 1) - i, mod) * comb(H - 2, x) * comb(W - 1, y) % mod print(ans % mod)