JOIN
Get Time
forums   
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat (newest first)  | Threaded  | Tree
Previous Thread  |  Next Thread
Find Total number of ways out of N Number taking K numbers every M interval | Reply
Hello Topcoders, I have been stuck in a problem, that has thrown my brain out of the coding. This problem is at very high priority and I need the solution as early as possible. Problem is as :

There are exactly N advertising boards on the highway from main city. Now a company want to advertise on some of these advertising boards(each advertising board costs some money) .

Company strategy is that, they want at least 'K' advertisement should be there among M consecutive advertising boards. But at the same time Company want to pay minimum for its advertisement .

Now, what is the total number of ways, different ways Company can advertise meeting its minimum cost strategy.

As for Example:
N= 3, M = 2, K=1 ==>
there is only one way for minimum cost, ie. 0C0 , where '0' denotes No company advertisement, and 'C' denotes company advertisement board.

Similarly, for N =4, M =2, K =1 ==>
there is 3 possible ways, ie. C0C0, 0C0C, 0CC0.

Hope to get a reply from someone soon.
Thanks.
Re: Find Total number of ways out of N Number taking K numbers every M interval (response to post by rohit3564) | Reply
Very Disappointing to see, not even a single reply yet. . . .
RSS