5 3 2 0 2 1 0 1 2 5 2 2 4 2 1 0 1 2 5
3 4 Initially, $A=(2,0,2,1,0)$. * In the $1$\-st query, print the inversion number $3$ of $(A_2,A_3,A_4,A_5)=(0,2,1,0)$. * The $2$\-nd query makes $A=(2,2,0,1,0)$. * In the $3$\-rd query, print the inversion number $4$ of $(A_2,A_3,A_4,A_5)=(2,0,1,0)$.
3 3 0 1 2 1 1 1 2 1 3 0 0 0 1 1 3
0 0
{
"problem": {
"name": "012 Inversion",
"description": {
"content": "You are given a sequence $A=(A_1,\\ldots,A_N)$ of length $N$. Each element is $0$, $1$, or $2$. Process $Q$ queries in order. Each query is of one of the following kinds: * `1 L R`: print the inve",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 5000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc265_g"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given a sequence $A=(A_1,\\ldots,A_N)$ of length $N$. Each element is $0$, $1$, or $2$. \nProcess $Q$ queries in order. Each query is of one of the following kinds:\n\n* `1 L R`: print the inve...",
"is_translate": false,
"language": "English"
}
]
}