結果

問題 No.1210 XOR Grid
ユーザー H3PO4H3PO4
提出日時 2021-12-30 16:01:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 603 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 51,736 KB
最終ジャッジ日時 2024-04-16 00:46:47
合計ジャッジ時間 40,747 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 539 ms
44,052 KB
testcase_01 AC 551 ms
44,184 KB
testcase_02 AC 550 ms
44,180 KB
testcase_03 AC 545 ms
44,064 KB
testcase_04 AC 550 ms
44,196 KB
testcase_05 AC 553 ms
44,312 KB
testcase_06 AC 551 ms
44,060 KB
testcase_07 AC 554 ms
44,060 KB
testcase_08 AC 544 ms
44,436 KB
testcase_09 AC 542 ms
44,188 KB
testcase_10 AC 555 ms
44,064 KB
testcase_11 AC 553 ms
44,436 KB
testcase_12 AC 544 ms
44,056 KB
testcase_13 AC 557 ms
44,060 KB
testcase_14 AC 550 ms
44,312 KB
testcase_15 AC 547 ms
44,572 KB
testcase_16 AC 545 ms
44,436 KB
testcase_17 AC 544 ms
44,568 KB
testcase_18 AC 540 ms
44,064 KB
testcase_19 AC 546 ms
44,064 KB
testcase_20 AC 554 ms
44,056 KB
testcase_21 AC 578 ms
44,056 KB
testcase_22 AC 548 ms
44,056 KB
testcase_23 AC 544 ms
43,932 KB
testcase_24 AC 534 ms
44,056 KB
testcase_25 AC 567 ms
51,100 KB
testcase_26 AC 574 ms
51,360 KB
testcase_27 AC 569 ms
50,840 KB
testcase_28 AC 566 ms
51,476 KB
testcase_29 AC 558 ms
50,976 KB
testcase_30 AC 565 ms
49,176 KB
testcase_31 AC 572 ms
50,980 KB
testcase_32 AC 570 ms
51,096 KB
testcase_33 AC 547 ms
44,056 KB
testcase_34 AC 547 ms
44,308 KB
testcase_35 AC 562 ms
44,064 KB
testcase_36 AC 562 ms
44,308 KB
testcase_37 AC 555 ms
44,064 KB
testcase_38 AC 566 ms
44,188 KB
testcase_39 AC 554 ms
44,324 KB
testcase_40 AC 564 ms
45,620 KB
testcase_41 AC 557 ms
45,204 KB
testcase_42 AC 592 ms
51,100 KB
testcase_43 AC 584 ms
49,732 KB
testcase_44 AC 603 ms
51,100 KB
testcase_45 AC 588 ms
51,736 KB
testcase_46 AC 588 ms
51,232 KB
testcase_47 AC 562 ms
45,380 KB
testcase_48 AC 560 ms
45,596 KB
testcase_49 AC 541 ms
44,188 KB
testcase_50 AC 575 ms
49,344 KB
testcase_51 AC 590 ms
51,364 KB
testcase_52 AC 590 ms
50,260 KB
testcase_53 AC 584 ms
50,972 KB
testcase_54 AC 562 ms
45,344 KB
testcase_55 AC 576 ms
47,512 KB
testcase_56 AC 563 ms
50,972 KB
testcase_57 AC 573 ms
48,544 KB
testcase_58 AC 544 ms
43,932 KB
testcase_59 AC 547 ms
44,060 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

N, M, X = map(int, input().split())
A = np.fromstring(input(), dtype=np.int64, sep=' ')
B = np.fromstring(input(), dtype=np.int64, sep=' ')
MOD = 10 ** 9 + 7
if np.bitwise_xor.reduce(A) == np.bitwise_xor.reduce(B):
    print(pow(pow(2, (N - 1) * (M - 1), MOD), X, MOD))
else:
    print(0)
0