D. 构糟题

    Type: Default 1000ms 256MiB

构糟题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

给定一个正整数 WW

你需要构造一个 nn 个数的集合,集合中的数均为正整数,使得 1W1\sim W 中的任何数均能用集合中 131\sim 3 个数的和表示。

集合大小不超过 300300 ,集合中的数 Ai106A_i\le 10^6

输入格式

从文件 gouzao.ingouzao.in 中输入数据。 一行一个正整数 WW

输出格式

输出到文件 gouzao.outgouzao.out 中。 第一行一个正整数 nn 。 第二行 nn 个正整数 ,为集合中的数。

样例1输入

6

样例1输出

3
1 2 3

数据范围

对于 1010\\%{} 的数据,保证 1W101\le W \le 10

对于另外 1010\\%{} 的数据,保证 1W1001\le W \le 100

对于另外 2020\\%{} 的数据,保证 1W10001\le W \le 1000

对于另外 1010\\%{} 的数据,保证 1W100001\le W \le 10000

对于另外 2020\\%{} 的数据,保证 1W1000001\le W \le 100000

对于 100100\\%{} 的数据,保证 1W1061\le W \le 10^{6}

8.27精英班模拟赛补题

Not Attended
Status
Done
Rule
OI
Problem
4
Start at
2023-8-28 18:00
End at
2023-9-10 6:00
Duration
300 hour(s)
Host
Partic.
8