結果

問題 No.2911 位相の公理
ユーザー hiro1729
提出日時 2023-12-16 19:32:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 758 ms / 2,000 ms
コード長 276 bytes
コンパイル時間 366 ms
コンパイル使用メモリ 82,420 KB
実行使用メモリ 72,656 KB
最終ジャッジ日時 2024-09-27 07:48:09
合計ジャッジ時間 4,859 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
s = [int(input(), 2) for _ in range(M)]
st = set(s)
ok = True
if 0 not in st or (1<<N)-1 not in st:
	ok = False
for s0 in s:
	for s1 in s:
		if s0 & s1 not in st:
			ok = False
		if s0 | s1 not in st:
			ok = False
print("Yes" if ok else "No")
0