結果

問題 No.1210 XOR Grid
ユーザー tktk_snsntktk_snsn
提出日時 2021-01-03 16:42:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,202 ms / 2,000 ms
コード長 439 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 73,180 KB
最終ジャッジ日時 2024-04-21 11:36:25
合計ジャッジ時間 50,873 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 573 ms
43,688 KB
testcase_01 AC 590 ms
43,684 KB
testcase_02 AC 604 ms
43,696 KB
testcase_03 AC 611 ms
44,084 KB
testcase_04 AC 615 ms
44,076 KB
testcase_05 AC 604 ms
43,688 KB
testcase_06 AC 607 ms
43,944 KB
testcase_07 AC 609 ms
44,332 KB
testcase_08 AC 610 ms
43,692 KB
testcase_09 AC 627 ms
43,948 KB
testcase_10 AC 611 ms
44,080 KB
testcase_11 AC 613 ms
44,076 KB
testcase_12 AC 628 ms
43,824 KB
testcase_13 AC 592 ms
43,956 KB
testcase_14 AC 613 ms
43,944 KB
testcase_15 AC 597 ms
44,072 KB
testcase_16 AC 586 ms
43,856 KB
testcase_17 AC 604 ms
44,068 KB
testcase_18 AC 611 ms
43,944 KB
testcase_19 AC 589 ms
44,072 KB
testcase_20 AC 590 ms
44,080 KB
testcase_21 AC 606 ms
44,072 KB
testcase_22 AC 575 ms
44,068 KB
testcase_23 AC 586 ms
44,208 KB
testcase_24 AC 642 ms
44,332 KB
testcase_25 AC 855 ms
62,188 KB
testcase_26 AC 859 ms
62,412 KB
testcase_27 AC 889 ms
62,548 KB
testcase_28 AC 926 ms
62,692 KB
testcase_29 AC 701 ms
62,828 KB
testcase_30 AC 665 ms
57,864 KB
testcase_31 AC 710 ms
62,576 KB
testcase_32 AC 720 ms
62,204 KB
testcase_33 AC 593 ms
44,072 KB
testcase_34 AC 588 ms
44,076 KB
testcase_35 AC 574 ms
43,944 KB
testcase_36 AC 930 ms
48,304 KB
testcase_37 AC 897 ms
48,556 KB
testcase_38 AC 905 ms
48,168 KB
testcase_39 AC 751 ms
48,164 KB
testcase_40 AC 1,142 ms
51,444 KB
testcase_41 AC 1,173 ms
54,396 KB
testcase_42 AC 1,190 ms
72,852 KB
testcase_43 AC 1,080 ms
67,136 KB
testcase_44 AC 1,202 ms
73,036 KB
testcase_45 AC 1,186 ms
73,180 KB
testcase_46 AC 1,182 ms
71,336 KB
testcase_47 AC 753 ms
51,360 KB
testcase_48 AC 727 ms
51,488 KB
testcase_49 AC 624 ms
43,816 KB
testcase_50 AC 932 ms
67,808 KB
testcase_51 AC 828 ms
72,344 KB
testcase_52 AC 782 ms
67,752 KB
testcase_53 AC 806 ms
72,104 KB
testcase_54 AC 690 ms
51,400 KB
testcase_55 AC 755 ms
67,344 KB
testcase_56 AC 712 ms
62,448 KB
testcase_57 AC 766 ms
61,188 KB
testcase_58 AC 599 ms
43,820 KB
testcase_59 AC 611 ms
43,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)
mod = 10 ** 9 + 7


N, M, X = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

for _ in range(X):
    A, ma = np.divmod(A, 2)
    B, mb = np.divmod(B, 2)
    if (ma.sum() + mb.sum()) % 2 == 1:
        print(0)
        exit()

cnt = pow(2, N - 1, mod)
ans = pow(cnt, X * (M - 1), mod)
print(ans)
0