A new delivery of clothing has arrived today to the clothing store. This delivery consists of aa ties, bb scarves, cc vests and dd jackets.The store does not sell single clothing items — instead, it sells suits of two types:a suit of the first type consists of one tie and one jacket;a suit of the second type consists of one scarf, one vest and one jacket.Each suit of the first type costs ee coins, and each suit of the second type costs ff coins.Calculate the maximum possible cost of a set of suits that can be composed from the delivered clothing items. Note that one item cannot be used in more than one suit (though some items may be left unused).Print one integer — the maximum total cost of some set of suits that can be composed from the delivered items.It is possible to compose three suits of the second type in the first example, and their total cost will be 66. Since all jackets will be used, it's impossible to add anything to this set.The best course of action in the second example is to compose nine suits of the first type and eleven suits of the second type. The total cost is 9⋅4+11⋅6=1029⋅4+11⋅6=102.
A new delivery of clothing has arrived today to the clothing store. This delivery consists of aa ties, bb scarves, cc vests and dd jackets.The store does not sell single clothing items — instead, it sells suits of two types:a suit of the first type consists of one tie and one jacket;a suit of the second type consists of one scarf, one vest and one jacket.Each suit of the first type costs ee coins, and each suit of the second type costs ff coins.Calculate the maximum possible cost of a set of suits that can be composed from the delivered clothing items. Note that one item cannot be used in more than one suit (though some items may be left unused).Print one integer — the maximum total cost of some set of suits that can be composed from the delivered items.It is possible to compose three suits of the second type in the first example, and their total cost will be 66. Since all jackets will be used, it's impossible to add anything to this set.The best course of action in the second example is to compose nine suits of the first type and eleven suits of the second type. The total cost is 9⋅4+11⋅6=1029⋅4+11⋅6=102.<BR>
正在翻译中..