302542: CF491A. Up the hill

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Up the hill

题意翻译

爬山俱乐部“到山上去”刚刚结束了一次旅行,然后他们想记录一下他们走过的山头。 众所周知,有 $N$ 个中转站,在海平面以上 $1$ 至 $N$ 公里的整数高度上($1$ 至 $N$ 中的每一个整数高度都有一个对应的中转站)。在第一天他们从第一个中转站到第二个去,第二天从第二个中转站到第三个去,以此类推。最后一天他们从第 $N-1$ 个中转站成功地到了第 $N$ 个中转站,结束了旅行。 现在他们想知道他们经过的中转站的顺序。他们有一个旅行日志写了他们爬山了多少天,下山了多少天。输出满足爬山和下山天数的中转站可能。

题目描述

Hiking club "Up the hill" just returned from a walk. Now they are trying to remember which hills they've just walked through. It is known that there were $ N $ stops, all on different integer heights between $ 1 $ and $ N $ kilometers (inclusive) above the sea level. On the first day they've traveled from the first stop to the second stop, on the second day they've traveled from the second to the third and so on, and on the last day they've traveled from the stop $ N-1 $ to the stop $ N $ and successfully finished their expedition. They are trying to find out which heights were their stops located at. They have an entry in a travel journal specifying how many days did they travel up the hill, and how many days did they walk down the hill. Help them by suggesting some possible stop heights satisfying numbers from the travel journal.

输入输出格式

输入格式


In the first line there is an integer non-negative number $ A $ denoting the number of days of climbing up the hill. Second line contains an integer non-negative number $ B $ — the number of days of walking down the hill ( $ A+B+1=N $ , $ 1<=N<=100000 $ ).

输出格式


Output $ N $ space-separated distinct integers from $ 1 $ to $ N $ inclusive, denoting possible heights of the stops in order of visiting.

输入输出样例

输入样例 #1

0
1

输出样例 #1

2 1 

输入样例 #2

2
1

输出样例 #2

1 3 4 2

Input

题意翻译

爬山俱乐部“到山上去”刚刚结束了一次旅行,然后他们想记录一下他们走过的山头。 众所周知,有 $N$ 个中转站,在海平面以上 $1$ 至 $N$ 公里的整数高度上($1$ 至 $N$ 中的每一个整数高度都有一个对应的中转站)。在第一天他们从第一个中转站到第二个去,第二天从第二个中转站到第三个去,以此类推。最后一天他们从第 $N-1$ 个中转站成功地到了第 $N$ 个中转站,结束了旅行。 现在他们想知道他们经过的中转站的顺序。他们有一个旅行日志写了他们爬山了多少天,下山了多少天。输出满足爬山和下山天数的中转站可能。

加入题单

算法标签: