5 1 20 1 30 2 1 1 40 2 3
30 20 * Initially, $A$ is empty. * The first query appends $20$ to the end of $A$, making $A=(20)$. * The second query appends $30$ to the end of $A$, making $A=(20,30)$. * The answer to the third query is $30$, which is the $1$\-st value from the end of $A=(20,30)$. * The fourth query appends $40$ to the end of $A$, making $A=(20,30,40)$. * The answer to the fifth query is $20$, which is the $3$\-rd value from the end of $A=(20,30,40)$.
{
"problem": {
"name": "Append",
"description": {
"content": "You have an empty sequence $A$. There are $Q$ queries given, and you need to process them in the order they are given. The queries are of the following two types: * `1 x`: Append $x$ to the end o",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc340_b"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You have an empty sequence $A$. There are $Q$ queries given, and you need to process them in the order they are given. \nThe queries are of the following two types:\n\n* `1 x`: Append $x$ to the end o...",
"is_translate": false,
"language": "English"
}
]
}