結果
問題 | No.2225 Treasure Searching Rod (Easy) |
ユーザー |
![]() |
提出日時 | 2023-02-24 22:54:59 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 131 ms / 2,000 ms |
コード長 | 400 bytes |
コンパイル時間 | 518 ms |
コンパイル使用メモリ | 82,316 KB |
実行使用メモリ | 76,716 KB |
最終ジャッジ日時 | 2024-09-13 05:57:13 |
合計ジャッジ時間 | 3,360 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
MOD = 998244353H,W,K = map(int,input().split())G = [[0]*W for _ in range(H)]for _ in range(K):y,x,v = map(int,input().split())G[y-1][x-1] = vres = 0for i in range(H):for j in range(W):for y in range(H):for x in range(W):if (y+x >= i+j) and (y-x) >= (i-j):res += G[y][x]res %= MODprint(res)