解题思路:背包问题变种 详解思路:https://blog.csdn.net/u014328804/article/details/79776518 示例代码: #include<iostream> #include<vector> using namespace std; int a[8][3] = { {0, 0, 0}, {0, 1, 2}, {0, 2, 1}, {1, 1, 1}, {1, 0, 2}, {1, 2, 0}, {2, 0, 1}, {2, 1, 0} }; int getNum(int r, int g, int b) { vector...