結果

問題 No.11 カードマッチ
ユーザー 👑 colognecologne
提出日時 2022-01-20 17:35:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 343 bytes
コンパイル時間 1,716 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 71,248 KB
最終ジャッジ日時 2023-08-15 16:10:52
合計ジャッジ時間 2,797 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
70,916 KB
testcase_01 AC 70 ms
70,924 KB
testcase_02 AC 71 ms
71,008 KB
testcase_03 AC 69 ms
71,240 KB
testcase_04 AC 70 ms
71,076 KB
testcase_05 AC 68 ms
71,080 KB
testcase_06 AC 70 ms
71,008 KB
testcase_07 AC 69 ms
71,084 KB
testcase_08 AC 70 ms
70,936 KB
testcase_09 AC 70 ms
71,200 KB
testcase_10 AC 70 ms
70,984 KB
testcase_11 AC 68 ms
71,044 KB
testcase_12 AC 70 ms
71,248 KB
testcase_13 AC 69 ms
71,248 KB
testcase_14 AC 69 ms
71,080 KB
testcase_15 AC 68 ms
71,048 KB
testcase_16 AC 69 ms
71,072 KB
testcase_17 AC 70 ms
71,208 KB
testcase_18 AC 70 ms
70,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.readline


def main():
    W = int(input())
    H = int(input())
    N = int(input())

    ss = set()
    sk = set()
    for i in range(N):
        S, K = map(int, input().split())
        ss.add(S)
        sk.add(K)

    print(W*len(sk) + H*len(ss) - len(sk)*len(ss) - N)


if __name__ == '__main__':
    main()
0