結果

問題 No.1870 Xor Matrix
ユーザー ikomaikoma
提出日時 2022-03-11 23:23:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 664 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 86,732 KB
実行使用メモリ 131,760 KB
最終ジャッジ日時 2023-10-14 08:40:43
合計ジャッジ時間 4,677 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,368 KB
testcase_01 AC 62 ms
71,464 KB
testcase_02 AC 62 ms
71,332 KB
testcase_03 AC 117 ms
103,300 KB
testcase_04 AC 107 ms
99,292 KB
testcase_05 AC 121 ms
101,840 KB
testcase_06 AC 109 ms
101,352 KB
testcase_07 AC 107 ms
101,772 KB
testcase_08 AC 152 ms
131,760 KB
testcase_09 AC 95 ms
96,208 KB
testcase_10 AC 125 ms
108,288 KB
testcase_11 AC 151 ms
131,672 KB
testcase_12 AC 112 ms
106,156 KB
testcase_13 AC 90 ms
93,384 KB
testcase_14 AC 111 ms
100,388 KB
testcase_15 AC 119 ms
110,780 KB
testcase_16 AC 117 ms
99,616 KB
testcase_17 AC 109 ms
102,228 KB
testcase_18 AC 135 ms
119,224 KB
testcase_19 AC 112 ms
100,004 KB
testcase_20 AC 105 ms
100,696 KB
testcase_21 AC 109 ms
104,432 KB
testcase_22 AC 117 ms
101,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
ONLINE_JUDGE = sys.argv[-1] == 'ONLINE_JUDGE'
if not ONLINE_JUDGE and len(sys.argv)>1 and sys.argv[1]!="<":
    sys.stdin = open(sys.argv[1], "r", encoding="utf-8")

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
if "pypyjit" in sys.builtin_module_names:
    import pypyjit
    pypyjit.set_param("max_unroll_recursion=-1")


N,M=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
MOD = 998244353
ans = 0
for i in range(20):
    n=sum([(a>>i)&1 for a in A])
    m=sum([(b>>i)&1 for b in B])
    if (n&1)!=(m&1):
        print(0)
        exit()
print(pow(pow(pow(2,20,MOD), N-1,MOD),M-1,MOD))
0