P8781 [Lanqiao Cup 2022 NOI Qualifier B] Trimming Shrubs

Description

Alice needs to complete a job of trimming shrubs. There are $N$ shrubs neatly arranged in a row from left to right. Every evening, Alice trims one shrub and makes its height become $0$ centimeters. The order in which Alice trims the shrubs starts from the leftmost shrub, trimming one shrub to the right each day. After trimming the rightmost shrub, she reverses direction and starts trimming shrubs to the left from the next day. After trimming the leftmost shrub, she reverses direction again. This repeats in a cycle. Each shrub grows $1$ centimeter from morning to evening every day, and does not grow at other times. On the morning of the first day, the height of every shrub is $0$ centimeters. Alice wants to know the maximum height each shrub can grow to.

Input Format

A positive integer $N$, with the meaning as described in the statement.

Output Format

Output $N$ lines, each with one integer. The $i$-th line indicates the maximum height that the $i$-th shrub from left to right can reach.

Explanation/Hint

For $30\%$ of the testdata, $N \leq 10$. For $100\%$ of the testdata, $1 < N \leq 10000$. Lanqiao Cup 2022 provincial contest B group, problem D. Translated by ChatGPT 5