[Problem][1]

```
[2]
I have used hash map to store frequencies at each node of segment tree. Then I am simply querying it for the required answer. Is there something wrong in my approach i.e. I mean if the time constraints were not there was my logic correct. I can only verify my logic on sample test cases. Also what should be done to get this done in time limit.
P.S. I don't know MO's Algorithm
[1]: https://www.spoj.com/problems/DQUERY/
[2]: https://ideone.com/uPyp1M
```