4 2 1 4 3 4 2 1 1 4 5 2 2 1 5 1
4 5 1 3 The queries are processed as follows: * Initially, $A=(2,1,4,3)$. * The first query removes $1$, making $A=(2,4,3)$. * The second query inserts $5$ immediately after $4$, making $A=(2,4,5,3)$. * The third query removes $2$, making $A=(4,5,3)$. * The fourth query inserts $1$ immediately after $5$, making $A=(4,5,1,3)$.
6 3 1 4 5 9 2 7 2 5 1 3 5 1 9 7 2 9 2 3 1 2 3 2 4
5 1 7 2 3
{
"problem": {
"name": "Insert or Erase",
"description": {
"content": "You are given a sequence $A=(A_1,\\ldots,A_N)$ of length $N$. The elements of $A$ are distinct. Process $Q$ queries in the order they are given. Each query is of one of the following two types: * `1",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc344_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given a sequence $A=(A_1,\\ldots,A_N)$ of length $N$. The elements of $A$ are distinct.\nProcess $Q$ queries in the order they are given. Each query is of one of the following two types:\n\n* `1...",
"is_translate": false,
"language": "English"
}
]
}