結果

問題 No.1870 Xor Matrix
ユーザー SidewaysOwlSidewaysOwl
提出日時 2022-03-11 23:46:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 512 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 107,684 KB
最終ジャッジ日時 2023-10-14 09:02:57
合計ジャッジ時間 4,571 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,408 KB
testcase_01 AC 78 ms
71,092 KB
testcase_02 AC 77 ms
71,396 KB
testcase_03 AC 110 ms
99,036 KB
testcase_04 AC 127 ms
100,220 KB
testcase_05 AC 113 ms
99,844 KB
testcase_06 AC 118 ms
101,508 KB
testcase_07 AC 123 ms
102,876 KB
testcase_08 AC 124 ms
99,836 KB
testcase_09 AC 107 ms
94,688 KB
testcase_10 AC 119 ms
103,588 KB
testcase_11 AC 123 ms
99,164 KB
testcase_12 AC 124 ms
107,684 KB
testcase_13 AC 104 ms
93,380 KB
testcase_14 AC 127 ms
102,248 KB
testcase_15 AC 104 ms
92,256 KB
testcase_16 AC 107 ms
95,768 KB
testcase_17 AC 133 ms
99,592 KB
testcase_18 AC 121 ms
101,012 KB
testcase_19 AC 125 ms
100,496 KB
testcase_20 AC 112 ms
100,012 KB
testcase_21 AC 99 ms
89,868 KB
testcase_22 AC 111 ms
98,484 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
def cul(l):
    res = 0
    for i in range(len(l)):
        res ^= l[i]
    return res
if cul(a) == cul(b):
    mod = 998244353
    print(pow(2,(m-1)*(n-1),mod)**20 % mod)
else:
    print(0)
0