結果

問題 No.11 カードマッチ
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2023-06-07 21:51:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 5,000 ms
コード長 372 bytes
コンパイル時間 472 ms
コンパイル使用メモリ 86,884 KB
実行使用メモリ 73,104 KB
最終ジャッジ日時 2023-08-28 18:44:07
合計ジャッジ時間 4,666 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
73,024 KB
testcase_01 AC 107 ms
72,684 KB
testcase_02 AC 108 ms
72,980 KB
testcase_03 AC 106 ms
72,940 KB
testcase_04 AC 105 ms
73,104 KB
testcase_05 AC 106 ms
72,852 KB
testcase_06 AC 106 ms
72,812 KB
testcase_07 AC 107 ms
72,928 KB
testcase_08 AC 106 ms
73,008 KB
testcase_09 AC 109 ms
73,004 KB
testcase_10 AC 107 ms
72,984 KB
testcase_11 AC 108 ms
72,696 KB
testcase_12 AC 106 ms
72,756 KB
testcase_13 AC 105 ms
72,980 KB
testcase_14 AC 105 ms
72,908 KB
testcase_15 AC 106 ms
72,892 KB
testcase_16 AC 106 ms
72,884 KB
testcase_17 AC 105 ms
73,088 KB
testcase_18 AC 106 ms
72,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0