結果

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

ソースコード

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 << M):
	now = (1<<N) - 1
	for j in range(M):
		if i&(1<<j):
			now |= s[j]
	if now not in s:
		ok = False
print("Yes" if ok else "No")
0