結果

問題 No.11 カードマッチ
ユーザー warashiwarashi
提出日時 2015-02-13 02:48:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
MLE  
実行時間 -
コード長 445 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 817,048 KB
最終ジャッジ日時 2023-09-06 00:35:36
合計ジャッジ時間 4,771 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,196 KB
testcase_01 AC 14 ms
8,136 KB
testcase_02 AC 14 ms
8,152 KB
testcase_03 AC 12 ms
8,284 KB
testcase_04 MLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

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
rest = []
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
    rest.append((s, k))
print(W * H - count - N)
0