Tap here to switch tabs
Problem
Submissions

Problem: Minimum Amount of Time to Fill Cups

med
30 min
Try to solve the Minimum Amount of Time to Fill Cups problem.

Statement

You are given a 00 indexed integer array amount of length 33, where amount[0], amount[1], and amount[2] denote the number of cold, warm, and hot cups of water you need to fill, respectively.

In each second, you can choose to:

  • Fill 22 cups of different water types, or

  • Fill 11 cup of any water type.

Return the minimum number of seconds required to fill all the cups.

Constraints:

  • amount.length =3= 3

  • 0≤0 \leq amount[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Amount of Time to Fill Cups

med
30 min
Try to solve the Minimum Amount of Time to Fill Cups problem.

Statement

You are given a 00 indexed integer array amount of length 33, where amount[0], amount[1], and amount[2] denote the number of cold, warm, and hot cups of water you need to fill, respectively.

In each second, you can choose to:

  • Fill 22 cups of different water types, or

  • Fill 11 cup of any water type.

Return the minimum number of seconds required to fill all the cups.

Constraints:

  • amount.length =3= 3

  • 0≤0 \leq amount[i] ≤100\leq 100