#P1032G. Chattering
Chattering
No submission language available for this problem.
Description
There are parrots standing in a circle. Each parrot has a certain level of respect among other parrots, namely . When a parrot with respect level starts chattering, neighbours to the right and to the left of it start repeating the same words in 1 second. Their neighbours then start repeating as well, and so on, until all the birds begin to chatter.
You are given the respect levels of all parrots. For each parrot answer a question: if this certain parrot starts chattering, how many seconds will pass until all other birds will start repeating it?
In the first line of input there is a single integer , the number of parrots ().
In the next line of input there are integers , ..., , the respect levels of parrots in order they stand in the circle ().
Print integers. -th of them should equal the number of seconds that is needed for all parrots to start chattering if the -th parrot is the first to start.
Input
In the first line of input there is a single integer , the number of parrots ().
In the next line of input there are integers , ..., , the respect levels of parrots in order they stand in the circle ().
Output
Print integers. -th of them should equal the number of seconds that is needed for all parrots to start chattering if the -th parrot is the first to start.