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, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
Why should you evaluate trends when thinking about a career path?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
You know the right answer?
Write a program for, Range Booking
Virat is looking to book hotel rooms for an incoming delega...
Questions
question
Mathematics, 07.12.2021 02:00
question
Computers and Technology, 07.12.2021 02:00
question
English, 07.12.2021 02:00
question
Mathematics, 07.12.2021 02:00
Questions on the website: 13722361