10 2 3 5 8 13 21 34 55 89 144
1 6 110 8052 9758476 421903645 377386885 881422708 120024839 351256142 If $N=3$, for example, * when $X=(1,1,1)$, there is no tree with three vertices whose degrees are $1,1$, and $1$, so $f(X)=0$. * When $X=(2,1,1)$, the only possible tree is illustrated below. The diameter of this tree is $2$, so $f(X)=2$.  For $X=(2,1,1),(1,2,1),(1,1,2)$, we have $f(X)=2$; for other $X$, we have $f(X)=0$. Thus, the answer is $6$.
{
"problem": {
"name": "Maximum Diameter",
"description": {
"content": "For a sequence $X=(X_1,X_2\\ldots,X_N)$ of length $N$ consisting of positive integers, we define $f(X)$ as follows: * A tree with $N$ vertices is said to be good if and only if the degree of the $i$",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc290_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "For a sequence $X=(X_1,X_2\\ldots,X_N)$ of length $N$ consisting of positive integers, we define $f(X)$ as follows:\n\n* A tree with $N$ vertices is said to be good if and only if the degree of the $i$...",
"is_translate": false,
"language": "English"
}
]
}