結果
問題 |
No.2911 位相の公理
|
ユーザー |
|
提出日時 | 2023-12-16 19:30:35 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 360 bytes |
コンパイル時間 | 246 ms |
コンパイル使用メモリ | 82,916 KB |
実行使用メモリ | 82,848 KB |
最終ジャッジ日時 | 2024-09-27 07:48:03 |
合計ジャッジ時間 | 4,767 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 TLE * 1 -- * 7 |
ソースコード
N, M = map(int, input().split()) s = [int(input(), 2) for _ in range(M)] st = set(s) 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 st: 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 st: ok = False print("Yes" if ok else "No")