题目描述:
A new delivery of clothing has arrived today to the clothing store. This delivery consists of a ties, b scarves, c vests and d 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 e coins, and each suit of the second type costs f 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).
输入描述:
The first line contains one integer a (1≤a≤100000) — the number of ties.
The second line contains one integer b (1≤b≤100000) — the number of scarves.
The third line contains one integer c (1≤c≤100000) — the number of vests.
The fourth line contains one integer d (1≤d≤100000) — the number of jackets.
The fifth line contains one integer e (1≤e≤1000) — the cost of one suit of the first type.
The sixth line contains one integer f (1≤f≤1000) — the cost of one suit of the second type.
输出描述:
Print one integer — the maximum total cost of some set of suits that can
Codeforces--1271A--Suits
最新推荐文章于 2021-07-22 15:42:19 发布