#P11192. [COTS 2021] 菜 Jelo
[COTS 2021] 菜 Jelo
Background
Translated from Izborne Pripreme 2021 (Croatian IOI/CEOI Team Selection) D1T1。。
Due to the special SPJ of this problem, the TL and ML of this problem are changed to respectively. However, for contestants' programs, the time and memory limits are the same as in the original problem.
If you upload your answer using a zip package, name the files as respectively.
Problem Description
Given a positive even integer , construct a largest possible set such that $\left|\bigcup_{i,j\in S,i\lt j} \{i\oplus j\}\right|={|S|\choose 2}$。In other words, for any two chosen pairs in (, , , ), it holds that .
Here, denotes the bitwise XOR operation.
Input Format
One line containing a positive integer .
Output Format
The first line contains an integer .
Then output numbers describing .
4
6
0 1 2 4 8 15
Hint
For of the testdata, it is guaranteed that .
This problem has test points. Each test point has three scoring parameters . Let . The score is computed as:
$$\mathrm{score}(t)= \begin{cases} 2.4\cdot \frac{t}{t_1} & t\in [0,t_1) \\ 2.4+3.6\cdot \frac{t-t_1}{t_2-t_1} & t\in [t_1,t_2) \\ 6+12\cdot \frac{t-t_2}{t_3-t_2} & t\in [t_2,t_3) \\ 20 & t\in [t_3,2^N] \\ \end{cases}$$| Test Point ID | Score | ||||
|---|---|---|---|---|---|
[Hint] Please pay attention to the code length limit.
Translated by ChatGPT 5