結果

問題 No.2270 T0空間
コンテスト
ユーザー MasKoaTS
提出日時 2023-02-22 20:20:06
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 357 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 277 ms
コンパイル使用メモリ 85,564 KB
実行使用メモリ 67,360 KB
最終ジャッジ日時 2026-04-03 11:04:34
合計ジャッジ時間 3,180 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from bitarray import bitarray

n = int(input())
m = int(input())
st = [bitarray(input()) for _ in [0] * m]

for i in range(n):
	a = bitarray([True] * n)
	b = bitarray([False] * n)
	for bits in st:
		if(bits[i]):
			a &= bits
		else:
			b |= bits
	for j in range(n):
		if(i == j):
			continue
		if(a[j] and not(b[j])):
			print("No")
			exit(0)
print("Yes")
0