A subarray is good if it is non-empty and for every number from
Input Specification
The first line of input will contain
The second line of input will contain
Output Specification
Output on a single line, the number of good subarrays.
Sample Input 1
Copy
3 3
1 2 3
Sample Output 1
Copy
1
Sample Input 2
Copy
4 3
1 2 3 1
Sample Output 2
Copy
2
Comments