結果

問題 No.2911 位相の公理
コンテスト
ユーザー hiro1729
提出日時 2023-12-16 19:32:24
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 542 ms / 2,000 ms
コード長 276 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 213 ms
コンパイル使用メモリ 84,992 KB
実行使用メモリ 72,448 KB
最終ジャッジ日時 2026-04-14 04:15:05
合計ジャッジ時間 3,887 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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