Wael is playing a game called Balls and Boxes. There are N boxes in a row, each box i
has a strength S[i].
It is given that Wael can initially throw a ball into any box he wants. When a ball gets
inside some box i, two things will happen:
First, this ball will now jump into the box (i + S[i]).
. Second, the strength of the box i will get decreased by 1. If the strength of box i is
equal to 1, it won't be changed.
Wael wants to make the strength S[i] equal to 1 for all (1 <=i<= N). Your task is to find
the minimum number of balls that he needs to throw manually. Since the answer can be
large return the final answer modulo 10^9+7.
Answers
Answered by
3
Answer:
Photography is the art, application, and practice of creating durable images by recording light, either electronically by means of an image sensor, or chemically by means of a light-sensitive material such as photographic film.
Explanation:
improper question..
Similar questions