| | |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import org.apache.commons.codec.digest.Md5Crypt; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | CombinationFinder finder = new CombinationFinder(); |
| | | double[] nums = {3.0, 1.0, 4.0, 2.0}; |
| | | double target = 0.1; |
| | | List<Integer> result = finder.findCombination(nums, target); |
| | | System.out.println("最优组合的索引: " + result); // 例如,等值组合可能为索引2(4.0)和3(1.0) |
| | | // CombinationFinder finder = new CombinationFinder(); |
| | | // double[] nums = {3.0, 1.0, 4.0, 2.0}; |
| | | // double target = 0.1; |
| | | // List<Integer> result = finder.findCombination(nums, target); |
| | | // System.out.println("最优组合的索引: " + result); // 例如,等值组合可能为索引2(4.0)和3(1.0) |
| | | System.out.println(Cools.md5("123456")); |
| | | } |
| | | } |