結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-24 21:04:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 460 bytes
コンパイル時間 475 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 80,000 KB
最終ジャッジ日時 2023-10-11 05:27:49
合計ジャッジ時間 10,995 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
29,660 KB
testcase_01 AC 139 ms
29,648 KB
testcase_02 AC 136 ms
29,592 KB
testcase_03 AC 137 ms
29,744 KB
testcase_04 AC 135 ms
29,608 KB
testcase_05 AC 136 ms
29,640 KB
testcase_06 AC 138 ms
29,616 KB
testcase_07 AC 136 ms
29,616 KB
testcase_08 AC 133 ms
29,568 KB
testcase_09 AC 134 ms
29,776 KB
testcase_10 AC 137 ms
29,640 KB
testcase_11 TLE -
testcase_12 AC 1,051 ms
42,416 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

def solve():
	n = int(sys.stdin.readline())
	m = int(sys.stdin.readline())
	mat = np.array([np.array(list(sys.stdin.readline())[:-1]) for _ in [0] * m]).astype(bool)
	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