結果

問題 No.3311 フィルター
コンテスト
ユーザー detteiuu
提出日時 2025-10-30 23:27:47
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 113 ms / 2,000 ms
+ 544µs
コード長 232 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,070 ms
コンパイル使用メモリ 96,108 KB
実行使用メモリ 85,504 KB
最終ジャッジ日時 2026-07-16 01:28:00
合計ジャッジ時間 3,572 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N, M = map(int, input().split())
S = [int(input(), 2) for _ in range(M)]

bit = (1<<N)-1
for s in S:
    bit &= s

if bit != 0 and bit in S and M == 1<<sum((bit>>i & 1) == 0 for i in range(N)):
    print("Yes")
else:
    print("No")
0