結果
| 問題 | No.2225 Treasure Searching Rod (Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-24 22:05:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 116 ms / 2,000 ms |
| コード長 | 506 bytes |
| 記録 | |
| コンパイル時間 | 157 ms |
| コンパイル使用メモリ | 84,964 KB |
| 実行使用メモリ | 75,648 KB |
| 最終ジャッジ日時 | 2026-04-04 03:37:15 |
| 合計ジャッジ時間 | 2,291 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
import sys,random,bisect
from collections import deque,defaultdict
from heapq import heapify,heappop,heappush
from itertools import permutations
from math import gcd,log
input = lambda :sys.stdin.readline().rstrip()
mi = lambda :map(int,input().split())
li = lambda :list(mi())
H,W,K = mi()
tre = [tuple(mi()) for i in range(K)]
res = 0
for i in range(1,H+1):
for j in range(1,W+1):
for x,y,v in tre:
if x+y >= i+j and x-y >= i-j:
res += v
print(res % 998244353)