結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-24 19:02:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 338 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 48,272 KB
最終ジャッジ日時 2023-10-11 03:59:52
合計ジャッジ時間 15,846 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 167 ms
34,488 KB
testcase_01 AC 148 ms
29,544 KB
testcase_02 AC 137 ms
29,496 KB
testcase_03 AC 138 ms
29,432 KB
testcase_04 AC 136 ms
29,548 KB
testcase_05 AC 135 ms
29,472 KB
testcase_06 AC 138 ms
29,660 KB
testcase_07 AC 140 ms
29,584 KB
testcase_08 AC 137 ms
29,592 KB
testcase_09 AC 138 ms
29,564 KB
testcase_10 AC 137 ms
29,560 KB
testcase_11 AC 1,807 ms
38,476 KB
testcase_12 AC 859 ms
33,352 KB
testcase_13 AC 1,995 ms
43,664 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

n = int(input())
m = int(input())
lis = [np.array([bool(int(c)) for c in input()]) for _ in [0] * m]

for i in range(n):
	a = np.array([True] * n)
	b = np.array([False] * n)
	for bits in lis:
		if(bits[i]):
			a &= bits
		else:
			b |= bits
	c = a & ~b
	c[i] &= False
	if c.any():
		print("No")
		exit(0)
print("Yes")
0