3 2 1 3 3 2 3 1 2 1 3
2 2 1 In the first query, person $2$ is at the first position from the front, and person $3$ is at the third position, so person $2$ is further to the front. In the second query, person $1$ is at the second position from the front, and person $2$ is at the first position, so person $2$ is further to the front. In the third query, person $1$ is at the second position from the front, and person $3$ is at the third position, so person $1$ is further to the front.
7 3 7 2 1 6 5 4 13 2 3 1 2 1 3 3 6 3 7 2 4 3 7 1 3 4 7 1 6 2 4 1 3 1 3
3 2 3 3 3 2 3 3 7 1 2 3 3
{
"problem": {
"name": "Which is ahead?",
"description": {
"content": "There are $N$ people standing in a line. The person standing at the $i$\\-th position from the front is person $P_i$. Process $Q$ queries. The $i$\\-th query is as follows: * You are given integers $",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc342_b"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $N$ people standing in a line. The person standing at the $i$\\-th position from the front is person $P_i$.\nProcess $Q$ queries. The $i$\\-th query is as follows:\n\n* You are given integers $...",
"is_translate": false,
"language": "English"
}
]
}