-->
当前位置:首页 > 题库

PROGRAMMING:Fatigue WLS

Luz5年前 (2021-05-10)题库398
WLS likes programming. Once, in a long game, WLS felt that he was a little tired and needed to relax. So he did. But because WLS is not an ordinary person, he prefers unusual relaxation. In their spare time, WLS likes to solve unsolved problems, because solving problems is very useful.
WLS decided to solve the following problems:
1. There is an array a with n integers. We need to calculate interesting pairs (L, R)
2. Interesting definition of pairs: if a pair (L, R), R-L + 1 is even, then mid = (L + R) / 2 and a$$_ l$$^a$$_{ l+1}$$^....^a$${_{ Mid} $$equals a$$_{ mid+1}$$^a$$_{ mid+2}$$^....^a$${_{ r}}$$.
3. If you don't know {XOR, XOR, ^}, then you can go to see other topics, hope the game is happy! o(╯□╰)o
###Input format:
The first line is a positive integer n
The second line contains n positive integers a$${_ 1}$$、a$${_ 2}$$、......a$${_ n}$$.
1$$\le$$n$$\le$$3e5 1$$\le$$a$$_ i$$ $$\le$$2e6
Ensure that all operations do not exceed int
###Output format:
An integer represents your answer
###Input example:
```in
five
1 2 3 4 5
```
```in
six
3 2 2 3 7 6
```
```in
three
42 4 2
```
###Output example:
```out
one
```
```out
three
```
```out
0
```







answer:If there is no answer, please comment