Problem Statement  
Rabbit Hanako likes apples. She decided to plant apple trees along a straight road.
The road has D candidate positions for planting apple trees. These positions are numbered 0 through D1, from left to right. The distance between position x and position y is xy meters (xy denotes the absolute value of xy). She wants to plant N apple trees numbered from 0 to N1 in different positions. The trees may be planted in any order. The ith tree won't grow if there are other trees which are closer than r[i] meters. In other words, if i and j are distinct, the distance between the ith tree and the jth tree must be at least max(r[i],r[j]) meters. Return the number of ways to plant all apple trees modulo 1,000,000,007.  
Definition  
 
Constraints  
  D will be between 1 and 100,000, inclusive.  
  r will contain between 1 and 40 elements, inclusive.  
  Each element of r will be between 1 and 40, inclusive.  
Examples  
0)  
 
1)  
 
2)  
 
3)  
 
4)  
 
5)  
