結果

問題 No.1210 XOR Grid
ユーザー 双六双六
提出日時 2020-09-01 01:20:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 448 ms / 2,000 ms
コード長 623 bytes
コンパイル時間 439 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 131,600 KB
最終ジャッジ日時 2024-04-28 11:45:38
合計ジャッジ時間 9,748 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
53,504 KB
testcase_01 AC 44 ms
53,632 KB
testcase_02 AC 46 ms
53,632 KB
testcase_03 AC 47 ms
53,632 KB
testcase_04 AC 46 ms
53,888 KB
testcase_05 AC 47 ms
53,376 KB
testcase_06 AC 45 ms
53,888 KB
testcase_07 AC 45 ms
53,376 KB
testcase_08 AC 46 ms
54,144 KB
testcase_09 AC 45 ms
53,632 KB
testcase_10 AC 45 ms
53,504 KB
testcase_11 AC 46 ms
53,888 KB
testcase_12 AC 46 ms
53,376 KB
testcase_13 AC 45 ms
53,248 KB
testcase_14 AC 45 ms
53,504 KB
testcase_15 AC 46 ms
53,504 KB
testcase_16 AC 46 ms
53,504 KB
testcase_17 AC 46 ms
53,888 KB
testcase_18 AC 45 ms
54,016 KB
testcase_19 AC 46 ms
53,376 KB
testcase_20 AC 46 ms
53,504 KB
testcase_21 AC 46 ms
53,504 KB
testcase_22 AC 47 ms
53,248 KB
testcase_23 AC 46 ms
53,248 KB
testcase_24 AC 47 ms
53,376 KB
testcase_25 AC 252 ms
102,016 KB
testcase_26 AC 232 ms
101,888 KB
testcase_27 AC 233 ms
102,144 KB
testcase_28 AC 252 ms
101,888 KB
testcase_29 AC 117 ms
101,888 KB
testcase_30 AC 106 ms
102,272 KB
testcase_31 AC 121 ms
102,144 KB
testcase_32 AC 134 ms
102,144 KB
testcase_33 AC 48 ms
53,632 KB
testcase_34 AC 49 ms
54,016 KB
testcase_35 AC 49 ms
53,376 KB
testcase_36 AC 123 ms
96,384 KB
testcase_37 AC 121 ms
96,896 KB
testcase_38 AC 122 ms
96,896 KB
testcase_39 AC 101 ms
96,256 KB
testcase_40 AC 179 ms
116,352 KB
testcase_41 AC 186 ms
116,480 KB
testcase_42 AC 448 ms
131,420 KB
testcase_43 AC 363 ms
110,644 KB
testcase_44 AC 393 ms
131,600 KB
testcase_45 AC 422 ms
131,208 KB
testcase_46 AC 373 ms
131,016 KB
testcase_47 AC 121 ms
116,352 KB
testcase_48 AC 122 ms
116,352 KB
testcase_49 AC 50 ms
59,776 KB
testcase_50 AC 208 ms
111,360 KB
testcase_51 AC 165 ms
131,204 KB
testcase_52 AC 145 ms
109,300 KB
testcase_53 AC 163 ms
131,484 KB
testcase_54 AC 123 ms
116,352 KB
testcase_55 AC 133 ms
106,716 KB
testcase_56 AC 122 ms
101,888 KB
testcase_57 AC 136 ms
106,240 KB
testcase_58 AC 47 ms
53,760 KB
testcase_59 AC 46 ms
53,504 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