結果
| 問題 |
No.2911 位相の公理
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2024-10-04 22:17:39 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 717 bytes |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 82,116 KB |
| 実行使用メモリ | 83,624 KB |
| 最終ジャッジ日時 | 2024-10-04 22:17:43 |
| 合計ジャッジ時間 | 4,613 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 1 TLE * 1 -- * 4 |
ソースコード
import sys
input = sys.stdin.readline
N,M=map(int,input().split())
S=[input().strip() for i in range(M)]
A="0"*N
B="1"*N
if A in S and B 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=[]
W=[]
for k in range(N):
if X[k]=="1" or Y[k]=="1":
Z.append("1")
else:
Z.append("0")
if X[k]=="0" or Y[k]=="0":
W.append("1")
else:
W.append("0")
Z="".join(Z)
W="".join(W)
if Z in S and W in S:
pass
else:
print("No")
exit()
print("Yes")
titia