結果
問題 |
No.2270 T0空間
|
ユーザー |
![]() |
提出日時 | 2025-06-12 12:53:10 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 628 bytes |
コンパイル時間 | 378 ms |
コンパイル使用メモリ | 82,180 KB |
実行使用メモリ | 197,560 KB |
最終ジャッジ日時 | 2025-06-12 12:54:43 |
合計ジャッジ時間 | 7,170 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 TLE * 2 -- * 8 |
ソースコード
n = int(input()) m = int(input()) strings = [input().strip()[::-1] for _ in range(m)] mask0 = [0] * n # mask0[i] is the mask for bit i being 0 mask1 = [0] * n # mask1[i] is the mask for bit i being 1 for idx, s in enumerate(strings): for i in range(n): if s[i] == '0': mask0[i] |= 1 << idx else: mask1[i] |= 1 << idx ok = True for i in range(n): for j in range(i + 1, n): if (mask0[i] & mask1[j]) != 0 or (mask1[i] & mask0[j]) != 0: continue else: ok = False break if not ok: break print("Yes" if ok else "No")