Save the problem!
来源:互联网 发布:arnold for maya mac 编辑:程序博客网 时间:2024/06/07 01:37
Save the problem!
Attention: we lost all the test cases for this problem, so instead of solving the problem, we need you to generate test cases. We're going to give you the answer, and you need to print a test case that produces the given answer. The original problem is in the following paragraph.
People don't use cash as often as they used to. Having a credit card solves some of the hassles of cash, such as having to receive change when you can't form the exact amount of money needed to purchase an item. Typically cashiers will give you as few coins as possible in change, but they don't have to. For example, if your change is 30 cents, a cashier could give you a 5 cent piece and a 25 cent piece, or they could give you three 10 cent pieces, or ten 1 cent pieces, two 5 cent pieces, and one 10 cent piece. Altogether there are 18 different ways to make 30 cents using only 1 cent pieces, 5 cent pieces, 10 cent pieces, and 25 cent pieces. Two ways are considered different if they contain a different number of at least one type of coin. Given the denominations of the coins and an amount of change to be made, how many different ways are there to make change?
As we mentioned before, we lost all the test cases for this problem, so we're actually going to give you the number of ways, and want you to produce a test case for which the number of ways is the given number. There could be many ways to achieve this (we guarantee there's always at least one), so you can print any, as long as it meets the constraints described below.
Input will consist of a single integer A (1 ≤ A ≤ 105), the desired number of ways.
In the first line print integers N and M (1 ≤ N ≤ 106, 1 ≤ M ≤ 10), the amount of change to be made, and the number of denominations, respectively.
Then print M integers D1, D2, ..., DM (1 ≤ Di ≤ 106), the denominations of the coins. All denominations must be distinct: for any i ≠ j we must have Di ≠ Dj.
If there are multiple tests, print any of them. You can print denominations in atbitrary order.
18
30 41 5 10 25
3
20 25 2
314
183 46 5 2 139
题解:理解题意这题非常简单。我们只用1和2,通过计算我们可以发现ans=(n-1)*2。
Code:
var n:longint;begin readln(n); if n=1 then begin writeln('1 1'); writeln(1); end else begin writeln((n-1)*2,' 2'); writeln('1 2'); end;end.
- Save the problem!
- The four boys save money's problem
- codeforces 865A Save the problem!
- CodeForces 867B Save the problem!
- Codeforces Round #437 (Div. 2) B. Save the problem!
- AGU13-Save The Princess
- Save the dwarfs
- Save The Water Monster
- Save the Trees
- HDU4314-Save the dwarfs
- Save the Students! UVALive
- Save The Humans
- save the transient instance before
- DoSave save the current page
- hdu Save the dwarfs 4314
- hdu 4314 Save the dwarfs
- UVA 5984 - Save the Students!
- Disable The File Save Dialog
- Linux中GNU nano编辑器的使用
- java AWT Dialog(对话框),FileDialog(文件对话框)
- MIT18.06线性代数课程笔记2a:矩阵相乘的三种看待角度
- 杭电ACM 2028 Lowest Common Multiple Plus
- False Ordering
- Save the problem!
- Android LruCache in ListView
- git push时提示:更新被拒绝,因为您当前分支的最新提交落后于其对应的远程分支
- hdu5245(概率)
- 从一个小程序说起(1)
- HDU 2014
- python相关文档链接
- oracle修改数据库表列的数据类型
- maven 的聚合