結果
| 問題 | No.1836 Max Matrix |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-02-13 11:16:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 261 ms / 2,000 ms |
| コード長 | 254 bytes |
| 記録 | |
| コンパイル時間 | 155 ms |
| コンパイル使用メモリ | 82,512 KB |
| 実行使用メモリ | 60,288 KB |
| 最終ジャッジ日時 | 2024-06-29 05:30:07 |
| 合計ジャッジ時間 | 3,041 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)