結果
問題 | No.2225 Treasure Searching Rod (Easy) |
ユーザー |
![]() |
提出日時 | 2023-04-22 05:21:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 94 ms / 2,000 ms |
コード長 | 356 bytes |
コンパイル時間 | 155 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-06 20:46:07 |
合計ジャッジ時間 | 2,897 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
h,w,k=map(int,input().split())ms=[[0]*54 for _ in range(54)]h+=1w+=1for _ in range(k):y,x,v=map(int,input().split())ms[y][x]=vfor x in range(1,w):s=0for y in range(h,0,-1):s+=ms[y][x]ms[y][x]=sans=0for i in range(1,h):for j in range(1,w):for x in range(1,w):y=i+abs(j-x)if(1<=y and y<=h):ans+=ms[y][x]print(ans%998244353)