A company ABC requires to use an online server for research experimentation for a certain number...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A company ABC requires to use an online server for research experimentation for a certain number of days. The server will be used on certain days but not every day. To use an online server, the company is required to subscribe to a cloud provider. A cloud provider offers 3 subscriptions options: 1-day subscription, a 1-week subscription, or a 30-day subscription, each one of them has a price that can be found in a given array of prices, where prices [0] represents the price of a 1-day subscription, prices [1] represents the price of a 1-week subscription, and prices [2] represents the price of a 30-days subscription. Write a function MinSubscription to find the minimum amount of money that company ABC needs to have in order to use a server during all the experimentation days. Your function MinSubscription takes as parameters 3 values: E which represents the number of experimentation days. Days which has E integer values that represent the experimentation days Di where 1<Di <=365 Prices which has 3 values: 1-day Subscription, 1-Week Subscription, and 30-day Subscription Output: Your function should return the minimum cost of subscription(s) required to cover the given experimentation days /ho #include <iostream> #include <algorithm> int MinSubscription(int D, int * Days, int * Prices) { } return 0; A company ABC requires to use an online server for research experimentation for a certain number of days. The server will be used on certain days but not every day. To use an online server, the company is required to subscribe to a cloud provider. A cloud provider offers 3 subscriptions options: 1-day subscription, a 1-week subscription, or a 30-day subscription, each one of them has a price that can be found in a given array of prices, where prices [0] represents the price of a 1-day subscription, prices [1] represents the price of a 1-week subscription, and prices [2] represents the price of a 30-days subscription. Write a function MinSubscription to find the minimum amount of money that company ABC needs to have in order to use a server during all the experimentation days. Your function MinSubscription takes as parameters 3 values: E which represents the number of experimentation days. Days which has E integer values that represent the experimentation days Di where 1<Di <=365 Prices which has 3 values: 1-day Subscription, 1-Week Subscription, and 30-day Subscription Output: Your function should return the minimum cost of subscription(s) required to cover the given experimentation days /ho #include <iostream> #include <algorithm> int MinSubscription(int D, int * Days, int * Prices) { } return 0;
Expert Answer:
Answer rating: 100% (QA)
To solve this problem you can use dynamic programming to fi... View the full answer
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1337627900
13th edition
Authors: Carlos Coronel, Steven Morris
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Write a project management plan. we have a template and project description. we need to edit the template(table of contents) with our own ideas. CPSC 8820-01 Project Management Plan Your Unique...
-
Jane Grimes, retail fruit and vegetable merchant, does not keep a full set of accounting records. However, the following information has been produced from the business's records: 1. Summary of the...
-
A bowling ball weighing 71.2 N (16.0 Ib) is attached to the ceiling by a 3.80-m rope. The ball is pulled to one side and released; it then swings back and forth as a pendulum. As the rope swings...
-
Required Prepare entries to record the following transactions of Ibscon Company: Mar. 1, Accepted a $50,000, 60-day, 4.5% note dated this day in granting Bolton Company a time extension on its...
-
Johanna Marra and Eric Nazzaro began a romantic relationship in October 2013. That previous July, Nazzarro had purchased a duplex that he intended to renovate. Nazzarro rented out the top floor while...
-
Martinez Manufacturing Corporation accumulates the following data relative to jobs started and finished during the month of June 2012. Overhead is applied on the basis of standard machine hours....
-
Describe the growth of organized labor. What were some of the early unions that appeared at this time? What important strikes occurred at this time?
-
ASAP Delivery is a small company that transports business packages between San Francisco and Los Angeles. It operates a fleet of small vans that moves packages to and from a central depot within each...
-
A bolted connection is made up of 150 x87.5 x9.5mm Angle bar. The angle is made of A-36 steel and the bolts have a diameter of 20mm A 325 bolts where threads are excluded from shear planes....
-
The government wants to discourage the consumption of sugary drinks and proposes introducing a 20 percent tax on them. A survey shows that the demand for sugary drinks is perfectly elastic and people...
-
Describe a competitive market in which you buy or sell a good or service.
-
Does the report describe production efficiency or allocative efficiency or both? Defeat Malaria in a GenerationHeres How The world could be free of malaria within a generation, a major report says....
-
What happens to the quantity of smartphones supplied and the supply of smartphones if the price of a smartphone falls?
-
a. Calculate Fadis opportunity cost of a baklava and Hanias opportunity cost of a baklava. b. If each spends 30 minutes of each hour baking baklavas and 30 minutes producing chocolate bars, how many...
-
Develop a flow chart for the expenditure cycle of the 7-Eleven retail store containing the sales order and cash receipts
-
A line l passes through the points with coordinates (0, 5) and (6, 7). a. Find the gradient of the line. b. Find an equation of the line in the form ax + by + c = 0.
-
Why must a conceptual model be verified? What steps are involved in the verification process?
-
Explain what it means for a database to be aggregate aware.
-
Why are testing and evaluation of the database and applications not done by the same people who are responsible for the design and implementation? What minimum standards must be met during the...
-
Why does spreading feet apart help a surfer stay on the board?
-
If you stood atop a super-tall ladder three times as far from Earths center as at Earths surface, how would your weight compare with it present value?
-
How was Pioneer 10 able to escape the solar system with an initial speed less than escape speed?
Study smarter with the SolutionInn App