AP+BP+CPを最小化
Minimizing AP+BP+CP