結果
問題 | No.1338 Giant Class |
ユーザー | c-yan |
提出日時 | 2021-01-15 21:42:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 350 ms / 2,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 144 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 28,248 KB |
最終ジャッジ日時 | 2024-11-26 13:47:44 |
合計ジャッジ時間 | 5,746 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
from sys import stdin readline = stdin.readline H, W, Q = map(int, readline().split()) c = H * W t = {} result = [] for _ in range(Q): Y, X = map(int, readline().split()) t.setdefault(X - 1, H) p = t[X - 1] t[X - 1] = min(t[X - 1], Y - 1) c -= p - t[X - 1] result.append(c) print(*result, sep='\n')