結果
| 問題 |
No.2911 位相の公理
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2024-10-04 22:23:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 368 ms / 2,000 ms |
| コード長 | 427 bytes |
| コンパイル時間 | 125 ms |
| コンパイル使用メモリ | 81,896 KB |
| 実行使用メモリ | 65,144 KB |
| 最終ジャッジ日時 | 2024-10-04 22:23:04 |
| 合計ジャッジ時間 | 2,635 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
import sys
input = sys.stdin.readline
N,M=map(int,input().split())
S=[int(input().strip(),2) for i in range(M)]
SET=set(S)
if 0 in S and ((1<<N)-1) in S:
pass
else:
print("No")
exit()
for i in range(M):
for j in range(i+1,M):
X=S[i]
Y=S[j]
Z=X&Y
W=X|Y
if Z in SET and W in SET:
pass
else:
print("No")
exit()
print("Yes")
titia