QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 512 MB Total points: 100

#8965. 料理

Statistics

歌にもあるように、悲しい第三幕には進まないことにしましょう。もっとも、その歌は悲しい歌です。楽しい歌を思い出しましょう。

šnenokle、Šufnudle、Pihtije、Knaput が何か知っていますか?

Malnar さんは知っていますが、次の問題について手助けが必要です。

偶数の自然数 $N$ が与えられます。$\{0,1,\ldots,2^N-1\}$ の部分集合 $S$ について、集合内の要素の組から得られる $\binom{|S|}{2}$ 個のビット単位の XOR がすべて異なるとき、$S$ は空腹であるといいます。できるだけ大きな空腹な集合を求めてください。

problem_8965_41074121966a9c04bb2c4ed22594073c.png

入力

入力の唯一の行には、問題文にある自然数 $N$ が与えられます。

出力

1 行目に、あなたの空腹な集合の要素数を出力してください。

2 行目に、集合の要素を空白区切りで出力してください。

小課題

小課題 $N$ $t_1$ $t_2$ $t_3$ 得点
1 18 267 283 512 20
2 20 444 462 1024 20
3 26 2019 2040 8192 20
4 28 3295 3327 16384 20
5 30 5377 5430 32768 20

ある小課題で大きさ $t$ の空腹な集合を出力した場合、その小課題における解答の得点は次の式で求められます。

$$ \operatorname{得点}(t)= \begin{cases} 2.4\cdot\dfrac{t}{t_1} & t<t_1,\\ 2.4+3.6\cdot\dfrac{t-t_1}{t_2-t_1} & t_1\le t<t_2,\\ 6+12\cdot\dfrac{t-t_2}{t_3-t_2} & t_2\le t<t_3,\\ 20 & t_3\le t. \end{cases} $$

各小課題の得点は小数点以下 2 桁に丸められます。総得点は各小課題の得点の合計であり、これも小数点以下 2 桁に丸められます。

ソースコードの大きさは最大 1 MiB です。

入出力例

入力 1

4

出力 1

6
0 1 2 4 8 15

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.