luogu#P8781. [蓝桥杯 2022 省 B] 修剪灌木

[蓝桥杯 2022 省 B] 修剪灌木

Problem Description

Alice needs to complete a job of trimming shrubs.

There are NN shrubs neatly arranged in a row from left to right. Every evening, Alice trims one shrub and makes its height become 00 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 11 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 00 centimeters. Alice wants to know the maximum height each shrub can grow to.

Input Format

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

Output Format

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

3
4
2
4

Hint

For 30%30\% of the testdata, N10N \leq 10.

For 100%100\% of the testdata, 1<N100001 < N \leq 10000.

Lanqiao Cup 2022 provincial contest B group, problem D.

Translated by ChatGPT 5