結果

問題 No.2270 T0空間
ユーザー titiatitia
提出日時 2023-04-15 02:06:06
言語 PyPy3
(7.3.15)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 527 bytes
コンパイル時間 433 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 83,328 KB
最終ジャッジ日時 2024-04-18 23:07:40
合計ジャッジ時間 11,091 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,712 KB
testcase_01 AC 36 ms
51,968 KB
testcase_02 AC 38 ms
51,968 KB
testcase_03 AC 37 ms
51,968 KB
testcase_04 AC 37 ms
51,840 KB
testcase_05 AC 39 ms
51,968 KB
testcase_06 AC 40 ms
51,712 KB
testcase_07 AC 40 ms
51,968 KB
testcase_08 AC 38 ms
52,352 KB
testcase_09 AC 39 ms
51,840 KB
testcase_10 AC 39 ms
51,968 KB
testcase_11 AC 99 ms
76,160 KB
testcase_12 AC 74 ms
74,240 KB
testcase_13 AC 185 ms
79,488 KB
testcase_14 AC 413 ms
81,024 KB
testcase_15 AC 162 ms
79,488 KB
testcase_16 AC 240 ms
82,048 KB
testcase_17 TLE -
testcase_18 AC 511 ms
82,816 KB
testcase_19 TLE -
testcase_20 TLE -
testcase_21 AC 320 ms
82,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())
M=int(input())
S=[int(input().strip(),2) for i in range(M)]

for i in range(N):
    X1=(1<<N)-1
    X2=0

    for s in S:
        if s & (1<<i) != 0:
            X1&=s
        else:
            X2|=s

    flag=1

    #print(i,X1,X2)

    for j in range(N):
        if i==j:
            continue
        if (X1 & (1<<j) == 0 )or (X2 & (1<<j) != 0 ):
            True
        else:
            flag=0

    if flag==0:
        print("No")
        break
else:
    print("Yes")
0