結果
問題 |
No.60 魔法少女
|
ユーザー |
|
提出日時 | 2024-04-14 08:05:49 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 644 bytes |
コンパイル時間 | 213 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 30,764 KB |
最終ジャッジ日時 | 2024-10-03 05:12:46 |
合計ジャッジ時間 | 7,374 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | TLE * 1 -- * 9 |
ソースコード
n, k = map(int, input().split()) x = [] y = [] hp = [] for i in range(n): xi, yi, hpi = map(int, input().split()) x.append(xi) y.append(yi) hp.append(hpi) ax = [] ay = [] w = [] h = [] d = [] for i in range(k): axi, ayi, wi, hi, di = map(int, input().split()) ax.append(axi) ay.append(ayi) w.append(wi) h.append(hi) d.append(di) for i in range(k): for j in range(n): if (ax[i] <= x[j] <= (ax[i] + w[i])) and (ay[i] <= y[j] <= (ay[i] + h[i])): hp[j] -= d[i] if hp[j] < 0: hp[j] = 0 ans = 0 for i in range(n): ans += hp[i] print(ans)