6 4 1 1 2 1 4 3
9 There are eight sequences $B$ to consider: $B=(1,\ 1,\ 1,\ 1),\ (1,\ 1,\ 2),\ (1,\ 2,\ 1),\ (1,\ 3),\ (2,\ 1,\ 1),\ (2,\ 2),\ (3,\ 1),\ (4)$. For $L=8$, for instance, $B=(2,\ 2)$ is not a subsequence of $(A_1,A_2,\ \dots,\ A_8)=(1,\ 1,\ 2,\ 1,\ 4,\ 3,\ 1,\ 1)$. For $L=9$, on the other hand, every $B$ is a subsequence of $(A_1,A_2,\ \dots,\ A_9)=(1,\ 1,\ 2,\ 1,\ 4,\ 3,\ 1,\ 1,\ 2)$.
14 5 1 1 1 2 3 1 2 4 5 1 1 2 3 1
11
19 10 1 6 2 7 4 8 5 9 1 10 4 1 3 1 3 2 2 2 1
39
{
"problem": {
"name": "Constant Sum Subsequence",
"description": {
"content": "We have a sequence of positive integers of length $N^2$, $A=(A_1,\\ A_2,\\ \\dots,\\ A_{N^2})$, and a positive integer $S$. For this sequence of positive integers, $A_i=A_{i+N}$ holds for positive integer",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 5000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc150_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have a sequence of positive integers of length $N^2$, $A=(A_1,\\ A_2,\\ \\dots,\\ A_{N^2})$, and a positive integer $S$. For this sequence of positive integers, $A_i=A_{i+N}$ holds for positive integer...",
"is_translate": false,
"language": "English"
}
]
}