結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-22 21:38:05
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 447 bytes
コンパイル時間 492 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 96,900 KB
最終ジャッジ日時 2023-09-30 04:19:22
合計ジャッジ時間 16,438 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,440 KB
testcase_01 AC 69 ms
71,388 KB
testcase_02 AC 70 ms
71,092 KB
testcase_03 AC 73 ms
71,320 KB
testcase_04 AC 71 ms
71,128 KB
testcase_05 AC 68 ms
71,432 KB
testcase_06 AC 70 ms
71,288 KB
testcase_07 AC 70 ms
71,288 KB
testcase_08 AC 71 ms
71,252 KB
testcase_09 AC 70 ms
71,092 KB
testcase_10 AC 69 ms
71,616 KB
testcase_11 AC 150 ms
82,108 KB
testcase_12 AC 116 ms
78,708 KB
testcase_13 AC 261 ms
88,760 KB
testcase_14 AC 500 ms
88,728 KB
testcase_15 AC 433 ms
88,640 KB
testcase_16 AC 681 ms
94,280 KB
testcase_17 TLE -
testcase_18 AC 1,872 ms
96,792 KB
testcase_19 AC 1,887 ms
93,752 KB
testcase_20 TLE -
testcase_21 AC 1,884 ms
93,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	m = int(input())
	st = set([])
	for _ in [0] * m:
		k = 0
		for i, c in enumerate(input().rstrip()):
			k |= int(c) << i
		st.add(k)

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

solve()
0