結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-24 20:28:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 450 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 63,132 KB
最終ジャッジ日時 2023-10-11 05:02:20
合計ジャッジ時間 10,721 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
34,052 KB
testcase_01 AC 134 ms
29,684 KB
testcase_02 AC 133 ms
29,720 KB
testcase_03 AC 135 ms
29,672 KB
testcase_04 WA -
testcase_05 AC 134 ms
29,696 KB
testcase_06 AC 135 ms
29,656 KB
testcase_07 AC 136 ms
29,704 KB
testcase_08 AC 136 ms
29,648 KB
testcase_09 AC 135 ms
29,696 KB
testcase_10 WA -
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
import sys
input = sys.stdin.readline

n = int(input())
m = int(input())
mat = np.array([np.array(list(input().rstrip())).astype(bool) for _ in [0] * m])

for i in range(n):
	a = np.prod(np.array([v if(v[i]) else np.zeros(n) for v in mat]), axis = 0).astype(bool)
	b = np.sum(np.array([v if(~v[i]) else np.zeros(n) for v in mat]), axis = 0).astype(bool)
	c = a & ~b
	c[i] &= False
	if c.any():
		print("No")
		exit(0)
print("Yes")
0