結果

問題 No.1210 XOR Grid
ユーザー 双六双六
提出日時 2020-09-01 01:20:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 422 ms / 2,000 ms
コード長 623 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 86,568 KB
実行使用メモリ 137,648 KB
最終ジャッジ日時 2023-08-10 18:19:28
合計ジャッジ時間 11,689 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
71,400 KB
testcase_01 AC 81 ms
70,996 KB
testcase_02 AC 83 ms
71,276 KB
testcase_03 AC 87 ms
71,428 KB
testcase_04 AC 83 ms
71,060 KB
testcase_05 AC 85 ms
71,420 KB
testcase_06 AC 81 ms
71,112 KB
testcase_07 AC 81 ms
71,308 KB
testcase_08 AC 82 ms
71,272 KB
testcase_09 AC 81 ms
71,372 KB
testcase_10 AC 81 ms
71,000 KB
testcase_11 AC 81 ms
71,512 KB
testcase_12 AC 80 ms
71,360 KB
testcase_13 AC 84 ms
71,276 KB
testcase_14 AC 89 ms
71,296 KB
testcase_15 AC 86 ms
71,412 KB
testcase_16 AC 88 ms
71,452 KB
testcase_17 AC 87 ms
71,232 KB
testcase_18 AC 92 ms
71,328 KB
testcase_19 AC 86 ms
71,332 KB
testcase_20 AC 87 ms
71,052 KB
testcase_21 AC 88 ms
71,096 KB
testcase_22 AC 82 ms
71,456 KB
testcase_23 AC 85 ms
71,544 KB
testcase_24 AC 83 ms
71,416 KB
testcase_25 AC 255 ms
111,364 KB
testcase_26 AC 242 ms
108,536 KB
testcase_27 AC 231 ms
108,816 KB
testcase_28 AC 248 ms
110,828 KB
testcase_29 AC 130 ms
108,652 KB
testcase_30 AC 123 ms
104,564 KB
testcase_31 AC 129 ms
108,516 KB
testcase_32 AC 129 ms
108,452 KB
testcase_33 AC 80 ms
71,000 KB
testcase_34 AC 83 ms
71,256 KB
testcase_35 AC 84 ms
71,388 KB
testcase_36 AC 148 ms
104,392 KB
testcase_37 AC 155 ms
104,268 KB
testcase_38 AC 154 ms
104,596 KB
testcase_39 AC 135 ms
104,364 KB
testcase_40 AC 198 ms
131,788 KB
testcase_41 AC 207 ms
131,888 KB
testcase_42 AC 422 ms
122,624 KB
testcase_43 AC 371 ms
126,972 KB
testcase_44 AC 375 ms
114,916 KB
testcase_45 AC 402 ms
122,796 KB
testcase_46 AC 358 ms
119,264 KB
testcase_47 AC 150 ms
132,096 KB
testcase_48 AC 146 ms
131,936 KB
testcase_49 AC 88 ms
76,352 KB
testcase_50 AC 235 ms
134,924 KB
testcase_51 AC 179 ms
118,900 KB
testcase_52 AC 165 ms
121,084 KB
testcase_53 AC 170 ms
118,948 KB
testcase_54 AC 150 ms
137,648 KB
testcase_55 AC 157 ms
130,160 KB
testcase_56 AC 136 ms
108,612 KB
testcase_57 AC 152 ms
125,252 KB
testcase_58 AC 79 ms
71,232 KB
testcase_59 AC 82 ms
71,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N, M, X = getlist()
	A = getlist()
	B = getlist()
	ans = pow(2, (M - 1) * (N - 1) * X, con)
	jud = 0
	for _ in range(X):
		cnt = 0
		for i in range(N):
			if A[i] % 2 == 1:
				cnt += 1
			A[i] >>= 1

		for i in range(M):
			if B[i] % 2 == 1:
				cnt += 1
			B[i] >>= 1
		if cnt % 2 == 1:
			jud = 1
			break

	if jud == 1:
		print(0)
	else:
		print(ans)

if __name__ == '__main__':
	main()
0