Skip to content

Commit e7699c5

Browse files
committed
FoxPaintingBalls
1 parent 6e8a8aa commit e7699c5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

FoxPaintingBalls.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,15 @@ void print_vector(const vector<T> &v) {
6464

6565
class FoxPaintingBalls {
6666
/*
67-
*/
67+
* The colors R, G, B don't matter - the total number of balls is distributed
68+
* evenly, and one color might have 1 more than the others.
69+
* If the number of each color is the same, the problem is simplified
70+
* considerably.
71+
* If not, for example, if the number of balls required to make up the
72+
* triangle is {4, 3, 3}, then see how many times you can take out 10
73+
* (4 + 3 + 3) from each of the colors.
74+
* Once that step is complete, run a brute force.
75+
*/
6876

6977
public:
7078
LL theMax(LL R, LL G, LL B, int N) {

0 commit comments

Comments
 (0)