結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-22 22:41:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,897 ms / 2,000 ms
コード長 363 bytes
コンパイル時間 1,597 ms
コンパイル使用メモリ 85,584 KB
実行使用メモリ 94,892 KB
最終ジャッジ日時 2023-09-30 06:08:15
合計ジャッジ時間 12,333 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
70,972 KB
testcase_01 AC 61 ms
70,868 KB
testcase_02 AC 61 ms
71,088 KB
testcase_03 AC 64 ms
70,704 KB
testcase_04 AC 61 ms
70,704 KB
testcase_05 AC 62 ms
70,832 KB
testcase_06 AC 65 ms
70,904 KB
testcase_07 AC 61 ms
70,912 KB
testcase_08 AC 60 ms
71,152 KB
testcase_09 AC 64 ms
70,988 KB
testcase_10 AC 63 ms
70,916 KB
testcase_11 AC 132 ms
84,104 KB
testcase_12 AC 86 ms
78,776 KB
testcase_13 AC 181 ms
91,008 KB
testcase_14 AC 439 ms
91,508 KB
testcase_15 AC 169 ms
90,608 KB
testcase_16 AC 245 ms
93,616 KB
testcase_17 AC 1,680 ms
94,668 KB
testcase_18 AC 595 ms
94,704 KB
testcase_19 AC 1,730 ms
94,892 KB
testcase_20 AC 1,897 ms
94,672 KB
testcase_21 AC 362 ms
94,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	m = int(input())
	st = set([int(input().rstrip(), 2) for _ in [0] * m])

	MAX_INT = (1 << n) - 1
	for i in range(n):
		a = MAX_INT
		b = 0
		for k in st:
			if((k >> i) & 1):
				a &= k
			else:
				b |= k
		if(a & ~b & (MAX_INT - (1 << i))):
			print("No")
			exit(0)
	print("Yes")

solve()
0