red red chips, green green chips and blue blue chips. In one round you take one chip from each of two different non-empty piles and remove both. The game ends when fewer than two piles are non-empty.
Return the largest number of rounds you can play.red=3, green=3, blue=3 → 4
There are 9 chips and each round uses two, so at most 4 rounds. Four is reachable: say red+green, red+blue, green+blue, red+green, leaving a single blue chip.
red=1, green=2, blue=10 → 3
Every round needs at least one non-blue chip and there are only 3 of them. Pair each with a blue chip for 3 rounds.
red, green, blue ≤ 10⁵red=3, green=3, blue=3
4
Run checks the first 3 tests in your browser. Submit checks all 88 tests on the server, hidden ones included.