CF1771F Hossam and Range Minimum Query
Description
Hossam gives you a sequence of integers $ a_1, \, a_2, \, \dots, \, a_n $ of length $ n $ . Moreover, he will give you $ q $ queries of type $ (l, \, r) $ . For each query, consider the elements $ a_l, \, a_{l + 1}, \, \dots, \, a_r $ . Hossam wants to know the smallest number in this sequence, such that it occurs in this sequence an odd number of times.
You need to compute the answer for each query before process the next query.
Input Format
N/A
Output Format
N/A
Explanation/Hint
In the example,
$ $$$l_1 = 1, \, r_1 = 2, $ $ $ $ l_2 = 1, \, r_2 = 3, $ $ $ $ l_3 = 2, \, r_3 = 4, $ $ $ $ l_4 = 1, \, r_4 = 4, $ $ $ $ l_5 = 2, \, r_5 = 2, $ $ $ $ l_6 = 1, \, r_6 = 5. $ $$$