跳过正文
  1. Posts/

leetcode 40. Combination Sum II (枚举子集,和为定值)

·1 分钟
  * Total Accepted: **106670**
  * Total Submissions: **329718**
  * Difficulty: **Medium**
  * Contributor: **LeetCode**

Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.

Each number in C may only be used once in the combination.

Note:

  * All numbers (including target) will be positive integers.
  * The solution set must not contain duplicate combinations.

题意:若干正数,求所有和为target的组合。

思路:枚举子集,用和剪枝。

相关文章

leetcode 495. Teemo Attacking

·1 分钟
In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo’s attacking ascending time series towards Ashe and the poisoning time duration per Teemo’s attacking, you need to output the total time that Ashe is in poisoned condition.