← 返回 google 的题目列表Reverse Coin Change
类型:online_judge
You have an array coins representing different coin denominations, and a dp array where dp[i] represents the number of ways to construct the amount i. Please write a function to restore the possible coins array. Assume there is a unique solution to construct the dp array. Provide the function signature and description of input and output.
Example
Input
dp = [1, 1, 2, 2, 3, 4, 4, 5]