結果
問題 |
No.11 カードマッチ
|
ユーザー |
|
提出日時 | 2023-06-07 21:51:44 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 59 ms / 5,000 ms |
コード長 | 372 bytes |
コンパイル時間 | 230 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 55,936 KB |
最終ジャッジ日時 | 2024-12-30 03:43:23 |
合計ジャッジ時間 | 2,219 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline W = int(input()) H = int(input()) N = int(input()) SK = [tuple(map(int,input().split())) for _ in range(N)] s = Counter([s for s,k in SK]) k = Counter([k for s,k in SK]) ans = H*W - (W-len(s.values()))*(H-len(k.values()))-N print(ans)