結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-22 20:43:07
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 388 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 151,236 KB
最終ジャッジ日時 2023-09-30 03:35:00
合計ジャッジ時間 16,086 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,632 KB
testcase_01 AC 75 ms
71,376 KB
testcase_02 AC 75 ms
71,300 KB
testcase_03 AC 75 ms
71,328 KB
testcase_04 AC 75 ms
71,116 KB
testcase_05 AC 75 ms
71,224 KB
testcase_06 AC 74 ms
71,248 KB
testcase_07 AC 74 ms
71,256 KB
testcase_08 AC 75 ms
71,336 KB
testcase_09 AC 74 ms
71,624 KB
testcase_10 AC 77 ms
71,464 KB
testcase_11 AC 669 ms
94,692 KB
testcase_12 AC 403 ms
87,612 KB
testcase_13 AC 731 ms
118,584 KB
testcase_14 TLE -
testcase_15 AC 1,980 ms
118,628 KB
testcase_16 TLE -
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
m = int(input())
lis = [[bool(int(c)) for c in input()] for _ in [0] * m]

for i in range(n):
	a = [True] * n
	b = [False] * n
	for bits in lis:
		if(bits[i]):
			for j, f in enumerate(bits):
				a[j] &= f
		else:
			for j, f in enumerate(bits):
				b[j] |= f
	for j in range(n):
		if(i == j):
			continue
		if(a[j] and not(b[j])):
			print("No")
			exit(0)
print("Yes")
0