CF491A.Up the hill
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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.
登山俱乐部“勇攀高峰”刚刚结束了一次徒步旅行。现在他们正努力回忆起自己刚刚经过了哪些山丘。
已知一共有 N 个停靠点,每个停靠点的海拔高度均为 1 到 N 千米(含端点)之间的互不相同的整数。第一天,他们从第 1 个停靠点走到第 2 个停靠点;第二天,从第 2 个停靠点走到第 3 个停靠点;依此类推;最后一天,他们从第 N−1 个停靠点走到第 N 个停靠点,并成功完成了此次远征。
他们正试图确定各个停靠点的具体海拔高度。旅行日记中记载了他们上坡行走的天数和下坡行走的天数。
请帮助他们构造一组满足日记中所记录天数的可能的停靠点海拔高度。
输入格式
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 ≤ 100 000).
第一行包含一个非负整数 A,表示上山的天数。第二行包含一个非负整数 B,表示下山的天数(满足 A + B + 1 = N,其中 1 ≤ N ≤ 100 000)。
输出格式
Output N space-separated distinct integers from 1 to N inclusive, denoting possible heights of the stops in order of visiting.
输出 N 个空格分隔的互不相同的整数(取值范围为 1 到 N,含端点),表示按访问顺序排列的各停靠点可能的高度。
输入输出样例
输入#1
0 1
输出#1
2 1
输入#2
2 1
输出#2
1 3 4 2
输入解题思路,AI测评打分。不知道怎么写?