結果
問題 |
No.2911 位相の公理
|
ユーザー |
|
提出日時 | 2024-09-01 19:54:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 778 ms / 2,000 ms |
コード長 | 409 bytes |
コンパイル時間 | 432 ms |
コンパイル使用メモリ | 82,480 KB |
実行使用メモリ | 76,936 KB |
最終ジャッジ日時 | 2024-09-01 19:54:07 |
合計ジャッジ時間 | 5,799 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
N, M = map(int, input().split()) assert(1 <= N <= 16 and 1 <= M <= min(1 << N, 1 << 12)) s = [] for i in range(M): si = input() assert(all(i in "01" for i in si) and len(si) == N) s.append(int(si, 2)) 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")