結果
| 問題 |
No.1863 Xor Sum 2...?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-04 22:28:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 326 bytes |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 103,296 KB |
| 最終ジャッジ日時 | 2024-07-18 20:59:37 |
| 合計ジャッジ時間 | 3,278 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 18 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
ans = 0
for i in range(N):
if B[i] == 1:
continue
tot = 0
xor = 0
j = i
while (tot + A[j]) - (xor ^ A[j]) == 0 and j >= 0:
ans += 1
tot += A[j]
xor ^= A[j]
j -= 1
print(ans)