300777: CF148C. Terse princess

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

Description

Terse princess

题意翻译

公主要选新郎啦! 公主想选一个最有钱的新郎,所以当她看到一个新郎比之前的新郎都有钱时,她会发出“哦”的叫声,而若她看到一个新郎比前面所有新郎加起来都富有时,她会发出“哇!”的声音(但此时她不会发出“哦”的声音)。在遇到第一个新郎时,公主不会说话。 ### 输入格式 一行三个整数 $n$,$a$,$b$ 。( $n$ 为新郎个数,$a$ 为公主发出“哦”的叫声次数, $b$ 为公主发出“哇“的叫声次数) ### 输出格式 输出一个数列 $t$ ( $t_i$ $\le$ $50000$ ), $t_i$ 表示第 $i$ 个新郎的财富值,若有多组解,输出任意一组解,需满足公主发出叫声的次数。若无解则输出 $-1$ 。 $\mathtt{Translated\ by}$ @[$\mathtt{wkjwkj}$](https://www.luogu.com.cn/user/240405)

题目描述

«Next please», — the princess called and cast an estimating glance at the next groom. The princess intends to choose the most worthy groom, this is, the richest one. Whenever she sees a groom who is more rich than each of the previous ones, she says a measured «Oh...». Whenever the groom is richer than all previous ones added together, she exclaims «Wow!» (no «Oh...» in this case). At the sight of the first groom the princess stays calm and says nothing. The fortune of each groom is described with an integer between 1 and 50000. You know that during the day the princess saw $ n $ grooms, said «Oh...» exactly $ a $ times and exclaimed «Wow!» exactly $ b $ times. Your task is to output a sequence of $ n $ integers $ t_{1},t_{2},...,t_{n} $ , where $ t_{i} $ describes the fortune of $ i $ -th groom. If several sequences are possible, output any of them. If no sequence exists that would satisfy all the requirements, output a single number -1.

输入输出格式

输入格式


The only line of input data contains three integer numbers $ n,a $ and $ b $ ( $ 1<=n<=100,0<=a,b<=15,n&gt;a+b $ ), separated with single spaces.

输出格式


Output any sequence of integers $ t_{1},t_{2},...,t_{n} $ , where $ t_{i} $ ( $ 1<=t_{i}<=50000 $ ) is the fortune of $ i $ -th groom, that satisfies the given constraints. If no sequence exists that would satisfy all the requirements, output a single number -1.

输入输出样例

输入样例 #1

10 2 3

输出样例 #1

5 1 3 6 16 35 46 4 200 99

输入样例 #2

5 0 0

输出样例 #2

10 10 6 6 5

说明

Let's have a closer look at the answer for the first sample test. - The princess said «Oh...» (highlighted in bold): 5 1 3 6 16 35 46 4 200 99. - The princess exclaimed «Wow!» (highlighted in bold): 5 1 3 6 16 35 46 4 200 99.

Input

题意翻译

公主要选新郎啦! 公主想选一个最有钱的新郎,所以当她看到一个新郎比之前的新郎都有钱时,她会发出“哦”的叫声,而若她看到一个新郎比前面所有新郎加起来都富有时,她会发出“哇!”的声音(但此时她不会发出“哦”的声音)。在遇到第一个新郎时,公主不会说话。 ### 输入格式 一行三个整数 $n$,$a$,$b$ 。( $n$ 为新郎个数,$a$ 为公主发出“哦”的叫声次数, $b$ 为公主发出“哇“的叫声次数) ### 输出格式 输出一个数列 $t$ ( $t_i$ $\le$ $50000$ ), $t_i$ 表示第 $i$ 个新郎的财富值,若有多组解,输出任意一组解,需满足公主发出叫声的次数。若无解则输出 $-1$ 。 $\mathtt{Translated\ by}$ @[$\mathtt{wkjwkj}$](https://www.luogu.com.cn/user/240405)

加入题单

算法标签: