Codeforces Beta Round 49 (Div. 2)
C
Little Frog
Codeforces
1200
原题
← BD →
翻译中…

Once upon a time a little frog whose name was Vasya decided to travel around his home swamp. Overall there are $*n*$ mounds on the swamp, located on one line. The distance between the neighboring mounds is one meter. Vasya wants to visit all the mounds in one day; besides, he wants to visit each one exactly once. For that he makes a route plan, to decide the order in which to jump on the mounds. Vasya can pick any mound as the first one. He thinks it boring to jump two times at the same distance. That's why he wants any two jumps on his route to have different lengths. Help Vasya the Frog and make the plan for him.

翻译中…

Input

翻译中…

The single line contains a number $*n*$ ($1 ≤ *n* ≤ 10^{4}$) which is the number of mounds.

翻译中…

Output

翻译中…

Print $*n*$ integers $*p*_{*i*}$ ($1 ≤ *p*_{*i*} ≤ *n*$) which are the frog's route plan.

翻译中…
  • All the $*p*_{*i*}$'s should be mutually different.
  • All the $|*p*_{*i*}–*p*_{*i* + 1}|$'s should be mutually different ($1 ≤ *i* ≤ *n* - 1$).
翻译中…

If there are several solutions, output any.

翻译中…

样例

Input #1
2
Output #1
1 2
InputCopy OutputCopy
Input #2
3
Output #2
1 3 2
InputCopy OutputCopy
题目信息
题号
53C
时间限制
2 s
内存限制
256 MB
标签
构造

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。