結果
問題 | No.1863 Xor Sum 2...? |
ユーザー | irumo8202 |
提出日時 | 2022-03-04 22:06:37 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 267 bytes |
コンパイル時間 | 291 ms |
コンパイル使用メモリ | 86,484 KB |
実行使用メモリ | 100,472 KB |
最終ジャッジ日時 | 2023-09-26 01:08:16 |
合計ジャッジ時間 | 4,835 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 68 ms
71,060 KB |
testcase_01 | AC | 69 ms
70,768 KB |
testcase_02 | AC | 70 ms
70,764 KB |
testcase_03 | AC | 68 ms
70,836 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 | 92 ms
85,108 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 96 ms
91,052 KB |
testcase_16 | WA | - |
testcase_17 | AC | 85 ms
82,308 KB |
testcase_18 | WA | - |
testcase_19 | AC | 81 ms
80,252 KB |
testcase_20 | AC | 89 ms
86,924 KB |
testcase_21 | WA | - |
testcase_22 | AC | 82 ms
79,244 KB |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 112 ms
100,052 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | AC | 112 ms
100,472 KB |
ソースコード
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)