class Solution {
public:
int cutRope(int number) {
if(number == 2){
return 2;
}
if(number == 3){
return 3;
}
vector<int> dp;
dp.resize(number+1, -1);
for(int i=2;i<=3;++i){
dp[i] = i;
}
for(int i=4;i<=number;++i){
for(int k=2;k<=i/2;++k){
dp[i] = max(dp[i], k*dp[i-k]);
}
}
return dp[number];
}
};