結果
| 問題 | No.1836 Max Matrix |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-13 11:16:32 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| コード長 | 254 bytes |
| 記録 | |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 85,324 KB |
| 実行使用メモリ | 61,296 KB |
| 最終ジャッジ日時 | 2026-03-18 15:09:29 |
| 合計ジャッジ時間 | 1,958 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 |
ソースコード
h,w,m = map(int,input().split())
mod = 998244353
ans = 1
bh = 1
bw = 1
for i in range(1,m)[::-1]:
dif = m-i+1
nh = pow(dif,h,mod)
nw = pow(dif,w,mod)
count = (nh-bh)*(nw-bw)%mod
ans += count
ans %= mod
bh,bw = nh,nw
print(ans)