結果

問題 No.2270 T0空間
ユーザー 👑 p-adicp-adic
提出日時 2023-02-22 22:52:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 309 bytes
コンパイル時間 610 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 17,388 KB
最終ジャッジ日時 2023-09-30 06:07:17
合計ジャッジ時間 8,594 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,264 KB
testcase_01 AC 16 ms
7,872 KB
testcase_02 AC 15 ms
8,124 KB
testcase_03 AC 15 ms
7,888 KB
testcase_04 AC 16 ms
8,248 KB
testcase_05 AC 16 ms
7,876 KB
testcase_06 AC 16 ms
7,872 KB
testcase_07 AC 16 ms
8,176 KB
testcase_08 AC 16 ms
7,836 KB
testcase_09 AC 16 ms
7,976 KB
testcase_10 AC 16 ms
8,212 KB
testcase_11 AC 496 ms
10,200 KB
testcase_12 AC 152 ms
9,052 KB
testcase_13 AC 272 ms
11,824 KB
testcase_14 AC 1,211 ms
11,952 KB
testcase_15 AC 203 ms
11,956 KB
testcase_16 AC 249 ms
11,820 KB
testcase_17 TLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

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