Question: Please write this code in C + + . Be sure to include the concept of vectors and random numbers. Project Requirements: One day Dorothy
Please write this code in C Be sure to include the concept of vectors and random numbers.
Project Requirements:
One day Dorothy was wandering down the Yellow Brick Road and suddenly found mathbfN baskets containing emeralds. Each basket contains an initial number of emeralds, mathbfE
Dorothy picks up a basket and empties the emeralds, E onto the ground. Each time Dorothy empties a basket, Glinda the good witch appears and fills the same basket with the floor of E emeralds.
Glinda gives Dorothy a number of minutes to collect as many emeralds as she can. In a single minute, Dorothy can take all the emeralds in a basket, regardless of the number of emeralds in it
Find the maximum number of emeralds Dorothy can collect in the given number of minutes. Hint: Use a priorityqueue for this program.
Find the most efficient way to do this problem. You will be graded on the conciseness, organization, readability, and efficiency of your solution.
Sample Run:
Dorothy and Emeralds
Enter the number of baskets:
Enter the number of minutes:
Dorothy has gathered emeralds!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
