class Solution { public: int cutRope(int number) { if(number == 2) return 1; if(number == 3) return 2; //动态规划, O(n) vector<int> res = {0, 1, 2, 3};//数组这里记录的长度是不考虑继续再剪的最长长度,和前面的返回值稍有区别。 for(int i = 4; i <= number; i++){ int j = i / 2; ...