摘要: 2026.03.21 03.10 第四十二天 518 零钱兑换|| 完全背包问题。 class Solution { public: int change(int amount, vector<int>& coins) { vector<uint64_t> dp(amount + 1, 0); // 阅读全文
posted @ 2026-03-21 21:06 遠くの君 阅读(1) 评论(0) 推荐(0)
摘要: 2026.03.21 03.09 第四十一天 1049 最后一块石头的重量|| 和上一题的思想一样 关键是想到把问题转化为把石头尽可能分成重量近似,数量相同的两堆,然后求重量差。 class Solution { public: int lastStoneWeightII(vector<int>& 阅读全文
posted @ 2026-03-21 18:04 遠くの君 阅读(2) 评论(0) 推荐(0)