結果

問題 No.1863 Xor Sum 2...?
ユーザー irumo8202irumo8202
提出日時 2022-03-04 22:06:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 267 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 86,376 KB
実行使用メモリ 100,372 KB
最終ジャッジ日時 2023-09-26 01:08:52
合計ジャッジ時間 4,841 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
70,880 KB
testcase_01 AC 70 ms
70,888 KB
testcase_02 AC 71 ms
70,876 KB
testcase_03 AC 70 ms
70,856 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 90 ms
85,288 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 98 ms
90,980 KB
testcase_16 WA -
testcase_17 AC 86 ms
82,328 KB
testcase_18 WA -
testcase_19 AC 83 ms
80,020 KB
testcase_20 AC 91 ms
87,024 KB
testcase_21 WA -
testcase_22 AC 83 ms
78,968 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 115 ms
100,356 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 117 ms
100,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = int(B[0] == 0)
for i in range(1, N):
    x = A[i - 1] + A[i]
    y = A[i - 1] ^ A[i]
    if x - y == B[i]:
        ans += 1
    if B[i] == 0:
        ans += 1

print(ans)
0