結果
| 問題 | 
                            No.1338 Giant Class
                             | 
                    
| コンテスト | |
| ユーザー | 
                             aqua_tenhou
                         | 
                    
| 提出日時 | 2021-01-15 21:43:06 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 664 ms / 2,000 ms | 
| コード長 | 283 bytes | 
| コンパイル時間 | 79 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 23,996 KB | 
| 最終ジャッジ日時 | 2024-11-26 13:49:25 | 
| 合計ジャッジ時間 | 8,918 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 21 | 
ソースコード
h,w,q = map(int,input().split())
dic = {}
ans = h*w
for i in range(q):
    y,x = map(int,input().split())
    
    if x in dic:
        if y < dic[x]:
            ans -= dic[x] - y
            dic[x] = y
    else:
        ans -= h+1 - y
        dic[x] = y
        
    print(ans)
            
            
            
        
            
aqua_tenhou