2 2 0 1 2 3 1 1 0 0
2 6 2 5 The first query asks you to do the following. * For $j = 0$, we have $b_1b_0 = 00$ and $j' = 2$. Since $b_1 \neq 1$, skip the addition. * For $j = 1$, we have $b_1b_0 = 01$ and $j' = 3$. Since $b_1 \neq 1$, skip the addition. * For $j = 2$, we have $b_1b_0 = 10$ and $j' = 0$. Since $b_1 = 1$, add the value of $A_2$ to $A_0$. Now we have $A = (2, 1, 2, 3)$. * For $j = 3$, we have $b_1b_0 = 11$ and $j' = 1$. Since $b_1 = 1$, add the value of $A_3$ to $A_1$. Now we have $A = (2, 4, 2, 3)$. The second query asks you to do the following. * For $j = 0$, we have $b_1b_0 = 00$ and $j' = 1$. Since $b_0 = 0$, add the value of $A_0$ to $A_1$. Now we have $A = (2, 6, 2, 3)$. * For $j = 1$, we have $b_1b_0 = 01$ and $j' = 0$. Since $b_0 \neq 0$, skip the addition. * For $j = 2$, we have $b_1b_0 = 10$ and $j' = 3$. Since $b_0 = 0$, add the value of $A_2$ to $A_3$. Now we have $A = (2, 6, 2, 5)$. * For $j = 3$, we have $b_1b_0 = 11$ and $j' = 2$. Since $b_0 \neq 0$, skip the addition. Thus, $A$ will be $(2, 6, 2, 5)$ after processing all the queries.
3 10 606248357 338306877 919152167 981537317 808873985 845549408 680941783 921035119 1 1 0 0 0 0 0 0 0 1 0 1 0 1 2 0 2 0 2 0
246895115 904824001 157201385 744260759 973709546 964549010 61683812 205420980
{
"problem": {
"name": "Binary Representations and Queries",
"description": {
"content": "You are given an integer sequence $A = (A_0, A_1, \\ldots, A_{2^N-1})$ of length $2^N$. Additionally, $Q$ queries are given. For each $i = 1, 2, \\ldots, Q$, the $i$\\-th query is represented by two inte",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc151_d"
},
"statements": [
{
"statement_type": "Markdown",
"content": "You are given an integer sequence $A = (A_0, A_1, \\ldots, A_{2^N-1})$ of length $2^N$.\nAdditionally, $Q$ queries are given. For each $i = 1, 2, \\ldots, Q$, the $i$\\-th query is represented by two inte...",
"is_translate": false,
"language": "English"
}
]
}