結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-23 13:43:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,878 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 687 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 84,876 KB
最終ジャッジ日時 2023-09-30 16:15:57
合計ジャッジ時間 11,365 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
70,932 KB
testcase_01 AC 75 ms
71,140 KB
testcase_02 AC 74 ms
70,844 KB
testcase_03 AC 72 ms
70,856 KB
testcase_04 AC 74 ms
70,852 KB
testcase_05 AC 73 ms
71,068 KB
testcase_06 AC 71 ms
71,312 KB
testcase_07 AC 72 ms
71,068 KB
testcase_08 AC 72 ms
71,124 KB
testcase_09 AC 73 ms
71,000 KB
testcase_10 AC 73 ms
70,848 KB
testcase_11 AC 120 ms
77,464 KB
testcase_12 AC 94 ms
76,864 KB
testcase_13 AC 194 ms
81,028 KB
testcase_14 AC 466 ms
82,912 KB
testcase_15 AC 175 ms
81,012 KB
testcase_16 AC 269 ms
83,588 KB
testcase_17 AC 1,805 ms
84,736 KB
testcase_18 AC 623 ms
84,580 KB
testcase_19 AC 1,878 ms
84,788 KB
testcase_20 AC 1,834 ms
84,876 KB
testcase_21 AC 346 ms
84,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

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

solve()
0