結果

問題 No.2270 T0空間
ユーザー MasKoaTSMasKoaTS
提出日時 2023-02-23 13:35:07
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 817 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 98,528 KB
最終ジャッジ日時 2023-09-30 16:10:09
合計ジャッジ時間 6,543 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,004 KB
testcase_01 AC 72 ms
71,236 KB
testcase_02 WA -
testcase_03 AC 72 ms
70,988 KB
testcase_04 WA -
testcase_05 AC 72 ms
71,116 KB
testcase_06 AC 72 ms
71,020 KB
testcase_07 WA -
testcase_08 AC 71 ms
71,356 KB
testcase_09 AC 72 ms
71,076 KB
testcase_10 WA -
testcase_11 AC 191 ms
83,356 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 272 ms
89,176 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 408 ms
98,196 KB
testcase_18 WA -
testcase_19 AC 403 ms
97,324 KB
testcase_20 AC 404 ms
97,344 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

# 入出力のみ

import sys
input = sys.stdin.readline

def solve():
	n = int(input())
	m = int(input())
	ZEROS = ''.join(['0'] * (256 - n))
	ONES = ''.join(['1'] * n)
	s = ''.join([ZEROS, ONES])
	LIS = [int(s[j << 6: (j + 1) << 6], 2) for j in range(4)]
	lis = [[] for _ in [0] * m]
	for i in range(m):
		s = ''.join([ZEROS, input().rstrip()])
		lis[i] = [int(s[j << 6: (j + 1) << 6], 2) for j in range(4)]

	print("Yes")
	exit()
	
	for i in range(n):
		a = LIS[:]
		b = [0] * 4
		p = 3 - (i >> 6)
		q = i & 63
		for j in range(m):
			if((lis[j][p] >> q) & 1):
				for k in range(4):
					a[k] &= lis[j][k]
			else:
				for k in range(4):
					b[k] |= lis[j][k]
		for j in range(4):
			# print(bin(a[j]), bin(~(b[j] | (1 << q)))
			if(a[j] & ~(b[j] | (1 << q))):
				print("No")
				exit(0)
	print("Yes")

solve()
0