摘要: 桌上有 n 堆力扣币,每堆的数量保存在数组 coins 中。我们每次可以选择任意一堆,拿走其中的一枚或者两枚,求拿完所有力扣币的最少次数。 直接法: class Solution { public: int minCount(vector<int>& coins) { int res = 0; fo 阅读全文
posted @ 2020-08-10 23:24 epiphanyy 阅读(6) 评论(0) 推荐(0)