結果
| 問題 | 
                            No.1338 Giant Class
                             | 
                    
| コンテスト | |
| ユーザー | 
                             lie_of_lillie
                         | 
                    
| 提出日時 | 2021-06-02 20:55:43 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 374 ms / 2,000 ms | 
| コード長 | 316 bytes | 
| コンパイル時間 | 346 ms | 
| コンパイル使用メモリ | 82,432 KB | 
| 実行使用メモリ | 85,400 KB | 
| 最終ジャッジ日時 | 2024-11-15 16:24:18 | 
| 合計ジャッジ時間 | 7,748 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 21 | 
ソースコード
import collections
H,W,Q=map(int, input().split())
max_s = H*W
rank = collections.defaultdict(lambda :H)
for _ in range(Q):
    y,x=map(int,input().split())
    x-=1; y-=1
    if y < rank[x]:
        delta = rank[x] - y
        max_s -= delta
        print(max_s)
        rank[x] = y
    else:
        print(max_s)
            
            
            
        
            
lie_of_lillie