{"raw_statement":[{"iden":"problem statement","content":"There are $N$ cards. The $i$\\-th card has an integer $A_i$ written on it. For any two cards, the integers on those cards are different.\nUsing these cards, Takahashi and Aoki will play the following game:\n\n*   Aoki chooses an integer $x$.\n*   Starting from Takahashi, the two players alternately take a card. The card should be chosen in the following manner:\n    *   Takahashi should take the card with the largest integer among the remaining card.\n    *   Aoki should take the card with the integer closest to $x$ among the remaining card. If there are multiple such cards, he should take the card with the smallest integer among those cards.\n*   The game ends when there is no card remaining.\n\nYou are given $Q$ candidates for the value of $x$: $X_1, X_2, ..., X_Q$. For each $i$ ($1 \\leq i \\leq Q$), find the sum of the integers written on the cards that Takahashi will take if Aoki chooses $x = X_i$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 100$ $000$\n*   $1 \\leq Q \\leq 100$ $000$\n*   $1 \\leq A_1 < A_2 < ... < A_N \\leq 10^9$\n*   $1 \\leq X_i \\leq 10^9$ ($1 \\leq i \\leq Q$)\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $Q$\n$A_1$ $A_2$ $...$ $A_N$\n$X_1$\n$X_2$\n$:$\n$X_Q$"},{"iden":"sample input 1","content":"5 5\n3 5 7 11 13\n1\n4\n9\n10\n13"},{"iden":"sample output 1","content":"31\n31\n27\n23\n23\n\nFor example, when $x = X_3(= 9)$, the game proceeds as follows:\n\n*   Takahashi takes the card with $13$.\n*   Aoki takes the card with $7$.\n*   Takahashi takes the card with $11$.\n*   Aoki takes the card with $5$.\n*   Takahashi takes the card with $3$.\n\nThus, $13 + 11 + 3 = 27$ should be printed on the third line."},{"iden":"sample input 2","content":"4 3\n10 20 30 40\n2\n34\n34"},{"iden":"sample output 2","content":"70\n60\n60"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}