結果

問題 No.1870 Xor Matrix
ユーザー NatsubiSoganNatsubiSogan
提出日時 2022-03-11 21:45:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 133 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 31,000 KB
最終ジャッジ日時 2023-10-14 06:50:16
合計ジャッジ時間 3,649 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,904 KB
testcase_01 AC 15 ms
7,780 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 85 ms
21,352 KB
testcase_04 AC 130 ms
28,028 KB
testcase_05 AC 86 ms
27,084 KB
testcase_06 AC 100 ms
21,796 KB
testcase_07 AC 113 ms
23,992 KB
testcase_08 AC 118 ms
27,120 KB
testcase_09 AC 75 ms
21,336 KB
testcase_10 AC 99 ms
28,648 KB
testcase_11 AC 106 ms
29,436 KB
testcase_12 AC 112 ms
30,956 KB
testcase_13 AC 71 ms
18,608 KB
testcase_14 AC 126 ms
25,624 KB
testcase_15 AC 70 ms
18,532 KB
testcase_16 AC 79 ms
20,128 KB
testcase_17 AC 138 ms
31,000 KB
testcase_18 AC 101 ms
23,248 KB
testcase_19 AC 119 ms
26,352 KB
testcase_20 AC 89 ms
22,312 KB
testcase_21 AC 60 ms
19,696 KB
testcase_22 AC 84 ms
23,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#技術室奥#5 Day2 で既出です。ごめんなさい https://yukicoder.me/problems/no/1210

n, m = map(int, input().split())
x = 20
a = list(map(int, input().split()))
b = list(map(int, input().split()))
mod = 998244353
ax, bx = 0, 0
for i in range(n):
    ax ^= a[i]
for i in range(m):
    bx ^= b[i]
if ax != bx:
    print(0)
else:
    print(pow(pow(2, x, mod), (n - 1) * (m - 1), mod))
0