結果

問題 No.11 カードマッチ
ユーザー warashi
提出日時 2015-02-13 02:49:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 411 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 31,064 KB
最終ジャッジ日時 2024-06-23 19:41:39
合計ジャッジ時間 6,705 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 TLE * 1 -- * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import itertools
import sys

W = int(input())
H = int(input())
N = int(input())
Shand = [False] * (W + 1)
Khand = [False] * (H + 1)
count = 0
Shand[0] = True
Khand[0] = True
for line in sys.stdin:
    S, K = map(int, line.split())
    Shand[S] = True
    Khand[K] = True
for s, k in itertools.product(Shand, Khand):
    if s or k:
        continue
    count += 1
print(W * H - count - N)
0