結果

問題 No.2911 位相の公理
ユーザー 👑 p-adic
提出日時 2023-03-04 14:24:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 112 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 70,272 KB
最終ジャッジ日時 2024-09-21 17:54:53
合計ジャッジ時間 2,199 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R,P=input,range,print
N,M=map(int,I().split())
S=[int(I(),2)for m in R(M)]
p=1<<N
O=[0]*p
for s in S:O[s]=1
if O[0]*O[p-1]<1:P("No"),exit()
for m in R(1,M):
	for n in R(m):
		if O[S[m]&S[n]]*O[S[m]|S[n]]<1:P("No"),exit()
P("Yes")
0