結果
| 問題 |
No.2911 位相の公理
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-16 19:29:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 346 bytes |
| コンパイル時間 | 345 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 73,216 KB |
| 最終ジャッジ日時 | 2024-09-27 07:47:54 |
| 合計ジャッジ時間 | 5,409 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 RE * 2 TLE * 1 -- * 5 |
ソースコード
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")