結果

問題 No.2270 T0空間
ユーザー 👑 p-adicp-adic
提出日時 2023-02-22 22:51:35
言語 PyPy3
(7.3.15)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 308 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 84,688 KB
最終ジャッジ日時 2023-09-30 06:08:27
合計ジャッジ時間 11,803 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,156 KB
testcase_01 AC 77 ms
71,320 KB
testcase_02 AC 78 ms
71,176 KB
testcase_03 AC 80 ms
70,988 KB
testcase_04 AC 77 ms
71,184 KB
testcase_05 AC 78 ms
71,064 KB
testcase_06 AC 78 ms
71,156 KB
testcase_07 AC 80 ms
71,372 KB
testcase_08 AC 78 ms
71,352 KB
testcase_09 AC 77 ms
71,320 KB
testcase_10 AC 79 ms
70,884 KB
testcase_11 AC 151 ms
77,344 KB
testcase_12 AC 124 ms
77,392 KB
testcase_13 AC 240 ms
81,192 KB
testcase_14 AC 524 ms
82,540 KB
testcase_15 AC 218 ms
81,188 KB
testcase_16 AC 305 ms
83,812 KB
testcase_17 TLE -
testcase_18 AC 678 ms
84,648 KB
testcase_19 TLE -
testcase_20 TLE -
testcase_21 AC 386 ms
84,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
M = int(input())
S = [int(input(),2) for m in range(M)]
ambient = (2**N)-1
power = 1
for n in range(N):
	cap = ambient
	cup = power
	for s in S:
		if( ( s >> n ) & 1 == 1 ):
			cap &= s
		else:
			cup |= s
	if( ( ( ~cup ) & cap ) != 0 ):
		print( "No" )
		exit(0)
	power <<= 1
print( "Yes" )
0