結果

問題 No.11 カードマッチ
ユーザー tookunn_1213tookunn_1213
提出日時 2015-08-19 22:18:00
言語 Python2
(2.7.18)
結果
MLE  
実行時間 -
コード長 482 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 6,680 KB
実行使用メモリ 812,032 KB
最終ジャッジ日時 2023-09-25 13:28:07
合計ジャッジ時間 7,783 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,072 KB
testcase_01 AC 11 ms
5,940 KB
testcase_02 AC 12 ms
5,912 KB
testcase_03 AC 11 ms
5,864 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,H,N = int(raw_input()),int(raw_input()),int(raw_input())
S,K = [0 for i in range(N)],[0 for i in range(N)]
nm = [[0 for j in range(H)]for i in range(W)]
for i in range(N):
	S[i],K[i] = map(int,raw_input().split())
	nm[S[i] - 1][K[i] - 1] = - 1
	for j in range(W):
		if nm[j][K[i] - 1] >= 0:
			nm[j][K[i] - 1] += 1
	for j in range(H):
		if nm[S[i] - 1][j] >= 0:
			nm[S[i] - 1][j] += 1
count = 0
for i in range(W):
	for j in range(H):
		if nm[i][j] >= 1:
			count += 1
print count
0