結果

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

ソースコード

diff #
raw source code

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