You are given three integers l, r, and n. You are also given an array of integers a[1],a[2],...,a[n−1] of size n−1.
Determine the possible number of ways of selecting n integers x1,x2,...,xn from the range [l,r] such that the selected integers are in strictly increasing order (from left to right).
Note
Input format
Output format
Print the possible number of ways of selecting n integers x1,x2,...,xn.
Constraints
−106≤l≤r≤1062≤n≤1060≤a[i]≤109
The possible solutions for (x1,x2) are (1,4),(1,5),(1,6),(2,5),(2,6),(3,6).