当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1222:NEW RDSP MODE I

题目描述

Little A has became fascinated with the game Dota recently, but he is not a good player. In all the modes, the rdsp Mode is popular on online, in this mode, little A always loses games if he gets strange heroes, because, the heroes are distributed randomly.

Little A wants to win the game, so he cracks the code of the rdsp mode with his talent on programming. The following description is about the rdsp mode:

There are N heroes in the game, and they all have a unique number between 1 and N. At the beginning of game, all heroes will be sorted by the number in ascending order. So, all heroes form a sequence One.

These heroes will be operated by the following stages M times:

1.Get out the heroes in odd position of sequence One to form a new sequence Two;

2.Let the remaining heroes in even position to form a new sequence Three;

3.Add the sequence Two to the back of sequence Three to form a new sequence One.

After M times' operation, the X heroes in the front of new sequence One will be chosen to be Little A's heroes. The problem for you is to tell little A the numbers of his heroes.

输入解释

There are several test cases.

Each case contains three integers N (1<=N<1,000,000), M (1<=M<100,000,000), X(1<=X<=20).

Proceed to the end of file.

输出解释

For each test case, output X integers indicate the number of heroes. There is a space between two numbers. The output of one test case occupied exactly one line.

输入样例
5 1 2
5 2 2
输出样例
2 4
4 3
提示

In case two: N=5,M=2,X=2,the initial sequence One is 1,2,3,4,5.After the first operation, the sequence One is 2,4,1,3,5. After the second operation, the sequence One is 4,3,2,1,5.So,output 4 3.


该题目包含在题集 ACM赛制

题目来源 辽宁省赛2010

共提交 3

通过率 66.67%
时间上限 内存上限
1000 MS 128 MB