摘要:
class Solution { public: int f[60];//f[i]记录i能拆出的最大乘积 int integerBreak(int n) { for(int i=2;i<=n;i++) for(int j=1;j<i;j++)//枚举最后一个拆出的数字,这里不能只循环到i/2 f[i 阅读全文
posted @ 2023-04-24 16:28
穿过雾的阴霾
阅读(16)
评论(0)
推荐(0)
摘要:
class Solution { public: long long f[1010];//f[i]表示总和为i的选法个数 int combinationSum4(vector<int>& nums, int target) { int n=nums.size(); f[0]=1; for(int i 阅读全文
posted @ 2023-04-24 15:43
穿过雾的阴霾
阅读(16)
评论(0)
推荐(0)
摘要:
class Solution { public: int getMaxValue(vector<vector<int>>& grid) { int n=grid.size(),m=grid[0].size(); vector<vector<int>> f(n,vector<int> (m,0));/ 阅读全文
posted @ 2023-04-24 14:50
穿过雾的阴霾
阅读(18)
评论(0)
推荐(0)

浙公网安备 33010602011771号