QOJ.ac

QOJ

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

#8965. الطعام

Statistics

لن نريد فصلًا ثالثًا حزينًا، كما تقول الأغنية. لكن تلك الأغنية حزينة؛ فلنتذكر واحدة مرحة.

هل تعرفون ما هي šnenokle؟ وŠufnudle؟ وPihtije؟ وKnaput؟

السيد Malnar يعرف، لكنه يحتاج إلى مساعدة في المسألة التالية:

أُعطي عدد طبيعي زوجي $N$. تكون مجموعة الأعداد $S$ من $\{0,1,\ldots,2^N-1\}$ جائعة إذا كانت جميع نتائج عملية XOR على مستوى البتات لأزواج عناصر المجموعة، وعددها $\binom{|S|}{2}$، مختلفة. أوجد مجموعة جائعة بأكبر حجم ممكن.

problem_8965_a9b2ff966d71966cb3ad97f50be6cc5a.png

الإدخال

يحتوي السطر الوحيد من الإدخال على العدد الطبيعي $N$ المذكور في نص المسألة.

الإخراج

اطبع في السطر الأول عدد عناصر مجموعتك الجائعة.

اطبع في السطر الثاني عناصر المجموعة مفصولة بمسافات.

المهام الفرعية

المهمة الفرعية $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{points}(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} $$

ستُقرَّب نقاط كل مهمة فرعية إلى منزلتين عشريتين. وسيساوي إجمالي النقاط مجموع نقاط المهام الفرعية، وسيُقرَّب أيضًا إلى منزلتين عشريتين.

يمكن أن يبلغ حجم شفرتك المصدرية 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.