結果

問題 No.1210 XOR Grid
ユーザー mkawa2mkawa2
提出日時 2021-07-14 11:42:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 210 ms / 2,000 ms
コード長 776 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 10,896 KB
実行使用メモリ 46,340 KB
最終ジャッジ日時 2023-09-16 10:16:17
合計ジャッジ時間 10,601 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,868 KB
testcase_01 AC 15 ms
8,284 KB
testcase_02 AC 16 ms
7,856 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 AC 15 ms
7,912 KB
testcase_05 AC 14 ms
8,252 KB
testcase_06 AC 15 ms
8,264 KB
testcase_07 AC 14 ms
7,864 KB
testcase_08 AC 15 ms
8,340 KB
testcase_09 AC 15 ms
7,816 KB
testcase_10 AC 14 ms
8,252 KB
testcase_11 AC 15 ms
7,836 KB
testcase_12 AC 14 ms
8,244 KB
testcase_13 AC 15 ms
8,276 KB
testcase_14 AC 14 ms
7,840 KB
testcase_15 AC 14 ms
8,296 KB
testcase_16 AC 15 ms
7,872 KB
testcase_17 AC 15 ms
7,872 KB
testcase_18 AC 15 ms
7,844 KB
testcase_19 AC 15 ms
7,844 KB
testcase_20 AC 15 ms
7,800 KB
testcase_21 AC 15 ms
7,876 KB
testcase_22 AC 15 ms
8,264 KB
testcase_23 AC 14 ms
8,272 KB
testcase_24 AC 14 ms
8,124 KB
testcase_25 AC 115 ms
33,572 KB
testcase_26 AC 115 ms
33,192 KB
testcase_27 AC 117 ms
33,236 KB
testcase_28 AC 114 ms
33,212 KB
testcase_29 AC 114 ms
33,272 KB
testcase_30 AC 102 ms
28,292 KB
testcase_31 AC 115 ms
33,144 KB
testcase_32 AC 117 ms
33,552 KB
testcase_33 AC 15 ms
7,868 KB
testcase_34 AC 15 ms
7,876 KB
testcase_35 AC 15 ms
7,952 KB
testcase_36 AC 69 ms
11,480 KB
testcase_37 AC 72 ms
11,400 KB
testcase_38 AC 71 ms
11,340 KB
testcase_39 AC 67 ms
11,456 KB
testcase_40 AC 123 ms
16,772 KB
testcase_41 AC 122 ms
16,800 KB
testcase_42 AC 210 ms
46,340 KB
testcase_43 AC 197 ms
39,248 KB
testcase_44 AC 203 ms
46,264 KB
testcase_45 AC 203 ms
46,308 KB
testcase_46 AC 197 ms
44,120 KB
testcase_47 AC 129 ms
16,792 KB
testcase_48 AC 132 ms
16,760 KB
testcase_49 AC 15 ms
7,912 KB
testcase_50 AC 176 ms
38,680 KB
testcase_51 AC 203 ms
45,256 KB
testcase_52 AC 188 ms
40,028 KB
testcase_53 AC 201 ms
45,220 KB
testcase_54 AC 137 ms
16,740 KB
testcase_55 AC 183 ms
38,604 KB
testcase_56 AC 115 ms
33,560 KB
testcase_57 AC 157 ms
30,480 KB
testcase_58 AC 16 ms
8,212 KB
testcase_59 AC 15 ms
8,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

# sys.setrecursionlimit(200005)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def SI(): return sys.stdin.readline().rstrip()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
inf = 10**16
# md = 998244353
md = 10**9+7

n, m, x = LI()
aa = LI()
bb = LI()

s = 0
for a in aa+bb:
    s ^= a

if s:
    print(0)
    exit()

p = pow(2, (m-1)*(n-1), md)
ans = pow(p, x, md)
print(ans)
0