310579: CF1854E. Game Bundles
Description
Rishi is developing games in the 2D metaverse and wants to offer game bundles to his customers. Each game has an associated enjoyment value. A game bundle consists of a subset of games whose total enjoyment value adds up to $60$.
Your task is to choose $k$ games, where $1 \leq k \leq 60$, along with their respective enjoyment values $a_1, a_2, \dots, a_k$, in such a way that exactly $m$ distinct game bundles can be formed.
InputThe input is a single integer $m$ ($1 \le m \le 10^{10}$) — the desired number of game bundles.
OutputThe first line should contain an integer $k$ ($1 \le k \le 60$) — the number of games.
The second line should contain $k$ integers, $a_1, a_2, \dots, a_k$ ($1 \le a_1, a_2, \dots, a_k \le 60$) — the enjoyment values of the $k$ games.
ExamplesInput4Output
4 20 20 20 20Input
722Output
15 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1Input
1Output
1 60Note
In the first sample, any subset of size $3$ is a game bundle. There are $4$ such subsets.
Input
Output
输入数据格式:输入是一个整数m(1≤m≤10^10)——期望的游戏捆绑包数量。
输出数据格式:
- 第一行应包含一个整数k(1≤k≤60)——游戏的数量。
- 第二行应包含k个整数,a1, a2, …, ak(1≤a1, a2, …, ak≤60)——k个游戏的乐趣值。
示例:
- 输入:4
输出:4
20 20 20 20
- 输入:722
输出:15
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
- 输入:1
输出:1
60题目大意:Rishi正在2D元宇宙中开发游戏,并希望为顾客提供游戏捆绑包。每个游戏都有一个与之关联的乐趣值。一个游戏捆绑包由一个游戏子集组成,其总乐趣值加起来为60。任务是选择k个游戏,其中1≤k≤60,以及它们各自的乐趣值a1, a2, …, ak,使得恰好可以形成m个不同的游戏捆绑包。 输入数据格式:输入是一个整数m(1≤m≤10^10)——期望的游戏捆绑包数量。 输出数据格式: - 第一行应包含一个整数k(1≤k≤60)——游戏的数量。 - 第二行应包含k个整数,a1, a2, …, ak(1≤a1, a2, …, ak≤60)——k个游戏的乐趣值。 示例: - 输入:4 输出:4 20 20 20 20 - 输入:722 输出:15 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 - 输入:1 输出:1 60