結果

問題 No.2911 位相の公理
コンテスト
ユーザー hiro1729
提出日時 2023-12-16 19:32:24
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 566 ms / 2,000 ms
+ 283µs
コード長 276 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 235 ms
コンパイル使用メモリ 96,068 KB
実行使用メモリ 84,692 KB
最終ジャッジ日時 2026-09-05 05:02:50
合計ジャッジ時間 5,275 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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