Тестовое задание
Consider a small island, only trading with two shipowners. They only appear if they can use the total capacity of their ships.
Each one of them has two ships. They never send both their ships.
Price p is the same for all parts of the market.
For any tree a farmer maintains, they can collect 20 units of fruit. Cost equals $20 per tree.
Shipowner A brings his big ship if p \leq \$0.5, to collect 60 units of fruit and his small ship to collect 30 units of fruit, if p \leq \$2.
Shipowner B brings his big ship if p \leq \$1, to collect 20 units of fruit and his small ship to collect 15 units of fruit, if p \leq \$1.5.
Maximum profit is: