摘要: ```c class Solution { public: vector<int> res; vector<int> numberOfDice(int n) { vector<vector<int> >f(n+1,vector<int>(6*n+1));//f[i][j]表示选了i个数,和为j的所有 阅读全文
posted @ 2023-05-14 15:05 穿过雾的阴霾 阅读(62) 评论(0) 推荐(0)
摘要: class Solution { public: int maxProfit(vector<int>& prices) { int n=prices.size(); vector<int> f(n+1),g(n+1); //预处理f,f[i]表示前i天交易的最大值 for(int i=1,min_p 阅读全文
posted @ 2023-05-14 15:04 穿过雾的阴霾 阅读(20) 评论(0) 推荐(0)