結果
問題 | No.11 カードマッチ |
ユーザー | brthyyjp |
提出日時 | 2021-11-19 00:35:56 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 52 ms / 5,000 ms |
コード長 | 296 bytes |
コンパイル時間 | 657 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,096 KB |
最終ジャッジ日時 | 2024-12-28 01:37:53 |
合計ジャッジ時間 | 2,530 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
import sysimport io, osinput = io.BytesIO(os.read(0,os.fstat(0).st_size)).readlinew = int(input())h = int(input())n = int(input())S = set()K = set()for i in range(n):s, k = map(int, input().split())S.add(s)K.add(k)a = len(S)b = len(K)ans = h*w-(w-a)*(h-b)-nprint(ans)