Bob is playing with an array of
Note: An empty subarray is not acceptable.
Constraints
Subtask 1 [10%]
Subtask 2 [20%]
Subtask 3 [70%]
No additional constraints.
Input Specification
The first line of input will contain 3 integers
The next line of input will contain
Output Specification
Output 1 integer, the number of great subarrays multiplied by the number of good subarrays multiplied by the number of great-good subarrays modulo
Sample Input 1
3 2 4
1 2 3
Sample Output 1
96
Sample Input 2
10 3 10
2 3 5 2 2 3 4 1 4 1
Sample Output 2
46255
Comments