結果

問題 No.11 カードマッチ
ユーザー szkhtsszkhts
提出日時 2020-11-07 12:05:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
MLE  
実行時間 -
コード長 641 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,988 KB
実行使用メモリ 816,924 KB
最終ジャッジ日時 2023-09-29 20:32:05
合計ジャッジ時間 5,822 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,808 KB
testcase_01 AC 16 ms
7,880 KB
testcase_02 AC 14 ms
7,844 KB
testcase_03 AC 15 ms
7,816 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 #

W = int(input())
H = int(input())
N = int(input())

cards = []
for i in range(W):
    for j in range(H):
        cards.append([i + 1, j + 1])
    
my_cards = []
for i in range(N):
    my_cards.append(list(map(int, input().split())))

for my_card in my_cards:
    if my_card in cards:
        cards.remove(my_card)
        
temp = []
for my_card in my_cards:
    for card in cards:
        if my_card[0] == card[0]:
            temp.append(card)
        else:
            if my_card[1] == card[1]:
                temp.append(card)

result = []
for arr in temp:
    if arr not in result:
        result.append(arr)
        
print(len(result))
0