Frequent values
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 13771
Accepted: 5045
Description
You are given a sequence of n integers a1 , a2 , ... , an in non-decreasing order. In addition to that, you are given several queries consisting of indices i and j (1
≤ i ≤ j ≤ n). For each query, determine the most frequent value among the integers ai , ... , aj.
Input
The input consists of several test cases. Each test case starts with a line containing two inte......
阅读全文