You are given four integer arrays count, upgrade, sell, and money, each of length
For the
count[i] represents the initial number of servers available.
upgrade[i] represents the cost to upgrade one server.
sell[i] represents the amount of money gained from selling one server.
money[i] represents the initial amount of money available.
In each data center independently, you may sell any number of servers to gain additional money, and then use the total available money to upgrade as many of the remaining servers as possible. Each server can either be upgraded, sold, or left unmodified. Money gained in one data center cannot be transferred to another.
Return an integer array ans of length ans[i] represents the maximum number of servers that can be upgraded in the
Constraints:
count.length $= $ upgrade.length $= $ sell.length $= $ money.length
count[i], upgrade[i], sell[i], money[i]
You are given four integer arrays count, upgrade, sell, and money, each of length
For the
count[i] represents the initial number of servers available.
upgrade[i] represents the cost to upgrade one server.
sell[i] represents the amount of money gained from selling one server.
money[i] represents the initial amount of money available.
In each data center independently, you may sell any number of servers to gain additional money, and then use the total available money to upgrade as many of the remaining servers as possible. Each server can either be upgraded, sold, or left unmodified. Money gained in one data center cannot be transferred to another.
Return an integer array ans of length ans[i] represents the maximum number of servers that can be upgraded in the
Constraints:
count.length $= $ upgrade.length $= $ sell.length $= $ money.length
count[i], upgrade[i], sell[i], money[i]