結果
問題 |
No.2911 位相の公理
|
ユーザー |
![]() |
提出日時 | 2024-10-04 22:18:44 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 717 bytes |
コンパイル時間 | 212 ms |
コンパイル使用メモリ | 82,320 KB |
実行使用メモリ | 83,208 KB |
最終ジャッジ日時 | 2024-10-04 22:18:49 |
合計ジャッジ時間 | 4,542 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 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("0") else: W.append("1") Z="".join(Z) W="".join(W) if Z in S and W in S: pass else: print("No") exit() print("Yes")