subject

Write a program for, Range Booking
Virat is looking to book hotel rooms for an incoming delegation of engineers. She is Allowed to spend
anywhere between B Rupees and C Rupees (Both Inclusive). She needs to book rooms consecutively as
delegates would prefer to stay as close as possible.
Virat as been given the pricing of the rooms in the form of a array (A). You need to help virat to find the
total no of options available to book like this in the given range.
Note- There is no restriction in no of rooms he can book.( Min 1 or Max Size of the array)
Input Format
First Line contains 3 Integers N, B,c where N is the size of the array.
Second Line contains Nintegers denoting the price of t=each rooms available.
Output format
Total No of possible option available for to book the rooms.
Constraints
1 <= N, B,C <= 10^6
Sample Input o
568
105102
Sample Output o
3.
Explanation
[5,1],[5,1,0],[5,1,0,1) are only 3 consecutive options available within the price sum range
Sample Input
Sample Output
3
5 6 8
10 5 10 2
he

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What is the original authority for copyright laws
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
question
Computers and Technology, 23.06.2019 20:00
Me ajude por favor , coloquei uma senha e não consigo tira-la no chorme
Answers: 2
You know the right answer?
Write a program for, Range Booking
Virat is looking to book hotel rooms for an incoming delega...
Questions
question
History, 09.12.2021 01:00
question
Mathematics, 09.12.2021 01:00
question
Mathematics, 09.12.2021 01:00
Questions on the website: 13722361