5 5 3 4 1 5
3 There are three good pairs: $(l,r)=(1,4),(1,5),(2,5)$. For example, the sequence $(A_1,A_2,A_3,A_4)$ contains an arithmetic subsequence of length $3$, which is $(5,3,1)$, so $(1,4)$ is a good pair.
3 1 2 1
0 There may be cases where no good pairs exist.
9 10 10 1 3 3 7 2 2 5
3
{
"problem": {
"name": "Arithmetic Progression Subsequence",
"description": {
"content": "You are given a sequence $A$ of length $N$ consisting of integers between $1$ and $\\textbf{10}$, inclusive. A pair of integers $(l,r)$ satisfying $1\\leq l \\leq r\\leq N$ is called a good pair if it sat",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc170_b"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given a sequence $A$ of length $N$ consisting of integers between $1$ and $\\textbf{10}$, inclusive.\nA pair of integers $(l,r)$ satisfying $1\\leq l \\leq r\\leq N$ is called a good pair if it sat...",
"is_translate": false,
"language": "English"
}
]
}