#P1254. 扇区填数
扇区填数
Description
There is a circle. After an integer is given, it is divided into sectors. Please choose a positive integer for each sector.
After placing the numbers, you may pick a single number from one sector, or pick one number from each of two or more adjacent sectors; summing them produces a new number. Use the integers obtained in this way to form a consecutive integer sequence: , and make as large as possible.
Input Format
One line containing an integer .
Output Format
The first line contains the maximum . The following lines list all fillings that achieve this maximum .
Because a circle has no inherent order, the same filling may correspond to multiple outputs. To reduce this, it is required to list the numbers starting from (since the consecutive sequence must contain , the filled numbers must include ).
1
1
1
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号