Odd - MarisaOJ: Marisa Online Judge

Odd

Time limit: 2000 ms
Memory limit: 256 MB
Given an array $A$ of $n$ integers. Count the number of contiguous subsequences such that all values in the subsequence appear an odd number of times. ### Input - The first line contains two integers $n$. - The second line contains $n$ integers $A_i$. ### Output - Print an integer, the number of subsequences that satisfy the condition. ### Constraints - $1 \le n,A_i \le 10^5$. ### Example Input: ``` 3 1 2 2 ``` Output: ``` 4 ```