# You can only take 10% margin from the total sales. It’s a painful restriction but you bought a…

You can only take 10% margin from the total sales. It’s a painful restriction but you bought a magical stone from a wandering magician that tells you the budget of a customer who visits your store. Using that magical information, you can sell the most expensive and affordable product to all customers. You need to implement a program that calculates the maximum profit from your inventory list and all the visiting customers’ budget. The customers will always buy your first recommendation due to the magical force of the stone, only if your recommendation is affordable to their budget.

Unfortunately, your inventory list is all messed up and it will take too long to search the right item for each one of the customers. Implementation Instructions All prices and budgets will be given as a positive integer line by line, and -1 will note the end of each. You need to print out the maximum profit (max. total sales divided by 10). There will be some relatively large input and an execution time limit. Therefore, you need to utilize the binary search. You cannot sell item again that has been already sold. And assume that you can sell only one product to each customer. If there is no item affordable to the customer, (due to the small budget) you cannot sell any of your product to those.

Specification 1. The program is going to receive a sequence of prices of the items. You need the price list sorted to get full points.

2. After that, the program is going to receive a sequence of budgets of the customers line by line. You need to sell the most expensive product possible to each customer’s budget. You need to use the same technique from above to efficiently find the appropriate product.

3. Print out the maximum profit. (Max. total sales divided by 10)

Calculate the price
Pages (550 words)
\$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Online Academic Experts
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Education
Very fast response and did a excellent job.
Customer 453201, May 31st, 2022
Human Resources Management (HRM)
My son and I have been sick for two weeks, of course at the end of my semester. I am so grateful that myhomeworkgeeks were able to help! Both papers got A's and I couldn't be more thrilled! Thank you so much and don't forget to tip your writer!
Customer 453077, February 22nd, 2022
English 101
IThank you
Customer 452631, April 6th, 2021
Nursing
Usually, references need to be within the past 5 years. Thank you :)
Customer 452547, July 16th, 2021
English 101
great summery in terms of the time given. it lacks a bit of clarity but otherwise perfect.
Customer 452747, June 9th, 2021
First of all, the writer made sure that he completely understood my assignment and all the guidelines before he began writing. My paper was finished very fast and well before the specified deadline. I thought it was written excellently. He definitely completely grasped the topic. Overall, he is a great writer and I couldn't have asked for better.
Customer 452441, November 29th, 2021
English 101
very good paper thank you.
Customer 453083, February 18th, 2022
Health Care
The writer did not follow my choice of topic (Food/Water Insecurity, Hunger, & Poverty), the paper was instead written about Climate Change in Africa. However, the paper was still great and informative. Thank you!
Customer 452777, January 28th, 2022
Management
Thank you!!! I received my order in record timing.
Customer 452551, February 9th, 2021
Nursing
It was a very long paper, but she followed all the instructions, and she even finished the paper 5 days before the due date. Will write an essay with her again, thanks!
Customer 452967, November 27th, 2021
Criminal Justice
The paper was not accused of plagiarism and was written very well. I will let you know the grade once it is graded. Thank you
Customer 452671, April 26th, 2021
Nursing
I just need some minor alterations. Thanks.
Customer 452547, February 10th, 2021
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend