There are two brothers name Hazel (Bob) and Laurel (James). Their mom told them to buy \(n\) products from the store. There is one condition according to which they can shop:
Bob can bring the items that have the price difference greater than or equal to \(X\) with each other and James can bring the items that have the price difference greater than or equal to \(Y\) with each other.
You are required to determine the number of ways in which both of them can bring the items home.
Note: As the number of ways can be greater, print the answer modulo \(1e9+7\).
Input format
- The first line contains three integers \(n\), \(X\), and \(Y\) denoting the number of items, the price difference for Bob, and the price difference for James respectively.
- The second line contains \(n\) integers where \(A_i\) denotes the prices of the products.
Output format
Print the number of ways modulo 1e9+7.
Constraints
The answer for the input is 13.
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Login to unlock the editorial
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor