Andrey thinks he is genuinely a fruitful engineer, yet as a general rule he didn't know about the double inquiry calculation up to this point. Subsequent to perusing some writing Andrey comprehended that this calculation permits to rapidly find a specific number x in a cluster. that the components
Correct answer will be upvoted else Multiple Downvoted. Don't submit random answer. Computer science.
Andrey thinks he is genuinely a fruitful engineer, yet as a general rule he didn't know about the double inquiry calculation up to this point. Subsequent to perusing some writing Andrey comprehended that this calculation permits to rapidly find a specific number x in a cluster.
that the components of the cluster are listed from nothing, and the division is done in integers (adjusting down).
Andrey read that the calculation possibly works if the cluster is arranged. Notwithstanding, he tracked down this assertion false, in light of the fact that there unquestionably exist unsorted clusters for which the calculation track down x!
Andrey needs to compose a letter to the book writers, yet prior to doing that he should consider the stages of size n to such an extent that the calculation tracks down x in them. A change of size n is an exhibit comprising of n unmistakable integers among 1 and n in subjective request.
Help Andrey and see as the number of changes of size n which contain x at position pos and for which the given execution of the double hunt calculation tracks down x (brings valid back). As the outcome might be amazingly enormous, print the rest of its division by 109+7.
Input
The main line of input contains integers n, x and pos (1≤x≤n≤1000, 0≤pos≤n−1) — the necessary length of the stage, the number to look, and the necessary situation of that number, separately.
Output
Print a solitary number — the rest of the division of the number of legitimate stages by 109+7.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)