Equalmex
시간 제한5초메모리 제한1024 MB
각 질의 부분 배열마다, 부분 배열을 같은 최소 양의 미포함 정수를 갖는 k개의 연속 구간으로 나눌 수 있는 k의 개수를 구한다.
문제
It is well known among Romanian noblemen that the beauty of an integer array is the number of positive integers for which you can split the array into disjoint subarrays (sequences of consecutive elements) such that each element is contained in exactly one subarray and all the subarrays have the same minimum excluded element. The minimum excluded element of an integer array is the smallest strictly positive integer (greater than ) that does not appear in the array.
You are given an integer array and queries of the form , where for all .
For each query, you have to find the beauty of the array .
제한
- for all
- for all
예제
이 문제는 공개된 예제가 없습니다.