結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-24 20:59:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 452 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 10,812 KB
実行使用メモリ 53,684 KB
最終ジャッジ日時 2023-10-11 05:22:19
合計ジャッジ時間 17,186 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 417 ms
36,616 KB
testcase_01 AC 134 ms
29,632 KB
testcase_02 AC 130 ms
29,648 KB
testcase_03 AC 131 ms
29,712 KB
testcase_04 AC 131 ms
29,684 KB
testcase_05 AC 129 ms
29,708 KB
testcase_06 AC 129 ms
29,712 KB
testcase_07 AC 129 ms
29,648 KB
testcase_08 AC 128 ms
29,648 KB
testcase_09 AC 130 ms
29,672 KB
testcase_10 AC 128 ms
29,712 KB
testcase_11 TLE -
testcase_12 AC 1,040 ms
34,960 KB
testcase_13 TLE -
testcase_14 TLE -
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

def solve():
	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 for v in mat if(v[i])]), axis = 0).astype(bool)
		b = np.sum(np.array([v for v in mat if not(v[i]) ]), axis = 0).astype(bool)
		c = a & ~b
		c[i] = False
		if c.any():
			print("No")
			exit(0)
	print("Yes")

solve()
0