CF703D Mishka and Interesting sum
Description
Little Mishka enjoys programming. Since her birthday has just passed, her friends decided to present her with array of non-negative integers $ a_{1},a_{2},...,a_{n} $ of $ n $ elements!
Mishka loved the array and she instantly decided to determine its beauty value, but she is too little and can't process large arrays. Right because of that she invited you to visit her and asked you to process $ m $ queries.
Each query is processed in the following way:
1. Two integers $ l $ and $ r $ ( $ 1
Input Format
N/A
Output Format
N/A
Explanation/Hint
In the second sample:
There is no integers in the segment of the first query, presented even number of times in the segment — the answer is $ 0 $ .
In the second query there is only integer $ 3 $ is presented even number of times — the answer is $ 3 $ .
In the third query only integer $ 1 $ is written down — the answer is $ 1 $ .
In the fourth query all array elements are considered. Only $ 1 $ and $ 2 $ are presented there even number of times. The answer is .
In the fifth query $ 1 $ and $ 3 $ are written down. The answer is .