Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this problem you will be solving one of the most profound challenges of humans across the world since the beginning of time -
In this problem you will be solving one of the most profound challenges of humans across the world since the beginning of time - how to make lots of money. You are a middleman in the widget market. Your job is to buy widgets from widget producer companies and sell them to widget consumer companies. Each widget consumer company has an open request for one widget per day, until some end date, and a price at which it is willing to buy the widgets. On the other hand, each widget producer company has a start date at which it can start delivering widgets and a price at which it will deliver each widget. Due to fair competition laws, you can sign a contract with only one producer company and only one consumer company. You will buy widgets from the producer company, one per day, starting on the day it can start delivering, and ending on the date specified by the consumer company. On each of those days you earn the difference between the producer's selling price and the consumer's buying price. Your goal is to choose the consumer company and the producer company that will maximize your profits. Input The first line of input contains two integers m and n (1
Step by Step Solution
★★★★★
3.37 Rating (163 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started