結果
問題 |
No.11 カードマッチ
|
ユーザー |
|
提出日時 | 2015-02-13 02:48:22 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
MLE
|
実行時間 | - |
コード長 | 445 bytes |
コンパイル時間 | 210 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 818,048 KB |
最終ジャッジ日時 | 2024-06-23 19:41:31 |
合計ジャッジ時間 | 6,053 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 MLE * 1 -- * 14 |
ソースコード
#!/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)