結果
問題 |
No.1338 Giant Class
|
ユーザー |
![]() |
提出日時 | 2021-01-15 22:13:18 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 404 bytes |
コンパイル時間 | 232 ms |
コンパイル使用メモリ | 81,920 KB |
実行使用メモリ | 82,560 KB |
最終ジャッジ日時 | 2024-11-26 15:42:10 |
合計ジャッジ時間 | 3,864 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 RE * 1 |
other | AC * 4 WA * 1 RE * 16 |
ソースコード
h, w, q = map(int, input().split()) memo = {} temp = 0 for _ in range(q): y, x = map(int, input().split()) y -= 1 x -= 1 if y in memo: pre = memo[x] if pre < y: print(h * w - temp) else: memo[x] = y temp += pre - y print(h * w - temp) else: memo[x] = y temp += h - y print(h * w - temp)