結果
問題 | No.1338 Giant Class |
ユーザー |
|
提出日時 | 2021-06-07 00:47:08 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 398 ms / 2,000 ms |
コード長 | 286 bytes |
コンパイル時間 | 273 ms |
コンパイル使用メモリ | 81,968 KB |
実行使用メモリ | 86,544 KB |
最終ジャッジ日時 | 2024-11-23 22:27:29 |
合計ジャッジ時間 | 7,832 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
from collections import defaultdicth, w, q = map(int,input().split())occupied = defaultdict(lambda: h)ans = h*wfor _ in range(q):y, x = map(lambda x:int(x)-1,input().split())if y < occupied[x]:ans -= abs(occupied[x]-y)occupied[x] = yprint(ans)