Amy asks Mr. B problem D. Please help Mr. B to solve the following problem. Amy wants to crack Merkle–Hellman knapsack cryptosystem. Please help it. Given an array {ai} with length n
Amy asks Mr. B problem D. Please help Mr. B to solve the following problem. Amy wants to crack Merkle–Hellman knapsack cryptosystem. Please help it. Given an array {ai} with length n, and the sum s. Please find a subset of {ai}, such that the sum of the subset is s. For more details about Merkle–Hellman knapsack cryptosystem Please read https://en.wikipedia.org/wiki/Merkle%E2%80%93Hellman_knapsack_cryptosystem https://blog.nowcoder.net/n/66ec16042de7421ea87619a72683f807 Because of some reason, you might not be able to open Wikipedia. Whether you read it or not, this problem is solvable.