結果

問題 No.1210 XOR Grid
ユーザー dachengzdachengz
提出日時 2023-01-26 10:31:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 197 ms / 2,000 ms
コード長 282 bytes
コンパイル時間 834 ms
コンパイル使用メモリ 86,452 KB
実行使用メモリ 121,208 KB
最終ジャッジ日時 2023-09-09 13:53:12
合計ジャッジ時間 13,609 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,232 KB
testcase_01 AC 73 ms
71,360 KB
testcase_02 AC 74 ms
71,332 KB
testcase_03 AC 75 ms
71,228 KB
testcase_04 AC 73 ms
71,400 KB
testcase_05 AC 70 ms
71,044 KB
testcase_06 AC 72 ms
71,416 KB
testcase_07 AC 70 ms
71,364 KB
testcase_08 AC 73 ms
71,304 KB
testcase_09 AC 72 ms
71,284 KB
testcase_10 AC 74 ms
71,332 KB
testcase_11 AC 74 ms
71,504 KB
testcase_12 AC 73 ms
71,248 KB
testcase_13 AC 73 ms
71,048 KB
testcase_14 AC 73 ms
71,084 KB
testcase_15 AC 74 ms
71,316 KB
testcase_16 AC 72 ms
71,352 KB
testcase_17 AC 73 ms
71,088 KB
testcase_18 AC 74 ms
71,376 KB
testcase_19 AC 72 ms
71,500 KB
testcase_20 AC 73 ms
71,520 KB
testcase_21 AC 73 ms
71,188 KB
testcase_22 AC 74 ms
71,220 KB
testcase_23 AC 73 ms
71,384 KB
testcase_24 AC 74 ms
71,348 KB
testcase_25 AC 128 ms
93,816 KB
testcase_26 AC 134 ms
93,908 KB
testcase_27 AC 138 ms
93,760 KB
testcase_28 AC 122 ms
93,964 KB
testcase_29 AC 127 ms
94,100 KB
testcase_30 AC 123 ms
95,720 KB
testcase_31 AC 124 ms
93,840 KB
testcase_32 AC 128 ms
93,940 KB
testcase_33 AC 73 ms
71,416 KB
testcase_34 AC 76 ms
71,048 KB
testcase_35 AC 75 ms
71,048 KB
testcase_36 AC 97 ms
90,496 KB
testcase_37 AC 98 ms
90,664 KB
testcase_38 AC 97 ms
90,488 KB
testcase_39 AC 95 ms
90,572 KB
testcase_40 AC 128 ms
108,508 KB
testcase_41 AC 159 ms
108,032 KB
testcase_42 AC 185 ms
115,788 KB
testcase_43 AC 180 ms
121,208 KB
testcase_44 AC 197 ms
115,476 KB
testcase_45 AC 181 ms
114,292 KB
testcase_46 AC 171 ms
116,692 KB
testcase_47 AC 129 ms
108,744 KB
testcase_48 AC 132 ms
108,712 KB
testcase_49 AC 73 ms
71,468 KB
testcase_50 AC 140 ms
102,176 KB
testcase_51 AC 167 ms
115,496 KB
testcase_52 AC 173 ms
119,000 KB
testcase_53 AC 173 ms
114,948 KB
testcase_54 AC 129 ms
108,436 KB
testcase_55 AC 148 ms
106,728 KB
testcase_56 AC 124 ms
93,508 KB
testcase_57 AC 139 ms
99,040 KB
testcase_58 AC 75 ms
71,232 KB
testcase_59 AC 73 ms
71,516 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M, X = map(int, input().split())
A = map(int, input().split())
B = map(int, input().split())
tmp = 0
for a in A:
    tmp ^= a
for b in B:
    tmp ^= b
if tmp:
    print(0)
else:
    mod = 10 ** 9 + 7
    mod1 = mod - 1
    print(pow(2, (N - 1) * (M - 1) % mod1 * X % mod1, mod))
0