I got stuck with this problem for quite a time now.It can be counted how many ways to make N with a number of coins.But I have no idea how to answer range query for this problem.
Any detailed hint of overall solution of this problem,it will be so much helpful.Thanks in advance.