People in Silverland use coins.They have coins of value. Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price and he known the price would not more than m.But he didn't know the exact price of the watch.corresponding to the number of Tony's coins of value. then calculate how many prices Tony can pay use these coins.
People in Silverland use coins.They have coins of value A_1,A_2,A_3...A_n A 1 ,A 2 ,A 3 ...A n Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price(without change) and he known the price would not more than m.But he didn't know the exact price of the watch. You are to write a program which reads n,m,A_1,A_2,A_3...A_n n,m,A 1 ,A 2 ,A 3 ...A n and C_1,C_2,C_3...C_n C 1 ,C 2 ,C 3 ...C n corresponding to the number of Tony's coins of value A_1,A_2,A_3...A_n A 1 ,A 2 ,A 3 ...A n then calculate how many prices(form 1 to m) Tony can pay use these coins.
标签: HBC51167逆序对 排序 思维Coins题解