4 1 2 3 4
6 All six permutations of $(1,2,3)$ are possible as the final $A$. For example, $A=(2,1,3)$ can be obtained as follows: * Choose $2,3$. Remove $2$, and now $P=(1,3,4), A=(2)$. * Choose $1,3$. Remove $1$, and now $P=(3,4), A=(2,1)$. * Choose $3,4$. Remove $3$, and now $P=(4), A=(2,1,3)$.
3 3 1 2
1
24 10 24 3 4 8 14 5 2 22 9 21 1 15 6 13 23 18 12 7 17 19 16 20 11
303178128
{
"problem": {
"name": "Drop Min",
"description": {
"content": "There is a permutation $P$ of $(1,2,\\ldots,N)$ and an empty array $A$. Perform the following operation $N-1$ times on $P$: * Choose two adjacent elements. Remove the smaller of the chosen elements ",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc212_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There is a permutation $P$ of $(1,2,\\ldots,N)$ and an empty array $A$. Perform the following operation $N-1$ times on $P$:\n\n* Choose two adjacent elements. Remove the smaller of the chosen elements ...",
"is_translate": false,
"language": "English"
}
]
}