output_description: Print Q lines. The i-th line (1 \leq i \leq Q) should contain the answer for x
  = X_i.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N Q
      A_1 A_2 ... A_N
      X_1
      X_2
      :
      X_Q
attempt: # -*- coding: utf-8 -*-
  
  import sys, re
  from collections import deque, defaultdict, Counter
  from math import sqrt, hypot, factorial, pi, sin, cos, radians
  
  if sys.version_info.minor >= 5:
      from math import gcd
  else:
      from fractions import gcd
  from heapq import heappop, heappush, heapify, heappushpop
  from bisect import bisect_left, bisect_right
  from itertools import permutations, combinations, product
  from operator import itemgetter, mul
  from copy import deepcopy
  from functools import reduce, partial
  from fractions import Fraction
  from string import ascii_lowercase, ascii_uppercase, digits
  
  
  def input():
      return sys.stdin.readline().strip()
  
  
  def list2d(a, b, c):
      return [[c] * b for i in range(a)]
  
  
  def list3d(a, b, c, d):
      return [[[d] * c for j in range(b)] for i in range(a)]
  
  
  def ceil(x, y=1):
      return int(-(-x // y))
  
  
  def round(x):
      return int((x * 2 + 1) // 2)
  
  
  def fermat(x, y, MOD):
      return x * pow(y, MOD - 2, MOD) % MOD
  
  
  def lcm(x, y):
      return (x * y) // gcd(x, y)
  
  
  def lcm_list(nums):
      return reduce(lcm, nums, 1)
  
  
  def gcd_list(nums):
      return reduce(gcd, nums, nums[0])
  
  
  def INT():
      return int(input())
  
  
  def MAP():
      return map(int, input().split())
  
  
  def LIST():
      return list(map(int, input().split()))
  
  
  sys.setrecursionlimit(10**9)
  INF = float("inf")
  MOD = 10**9 + 7
  
  N, Q = MAP()
  A = LIST()
  
  sm = sum([A[i] for i in range(N - 1, -1, -2)])
  borders = [(INF, sm)]
  j = N - 3
  for i in range(N - 2, N // 2 - 1, -1):
      border = (A[j] + A[i]) // 2
      val = A[i] - A[j]
      sm += val
      borders.append((border, sm))
      j -= 2
  borders.sort()
  
  for _ in range(Q):
      x = INT()
      idx = bisect_left(borders, (x, 0))
      print(borders[idx][1])
  
problem_description: Statement
  
  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.
  
  Using these cards, Takahashi and Aoki will play the following game:
  
    * Aoki chooses an integer x.
    * Starting from Takahashi, the two players alternately take a card. The card should be chosen in the following manner:
      * Takahashi should take the card with the largest integer among the remaining card.
      * 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.
    * The game ends when there is no card remaining.
  
  You 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.
samples: [{"input": "5 5\n    3 5 7 11 13\n    1\n    4\n    9\n    10\n    13", "output": "31\n    31\n    27\n    23\n    23\n    \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.\n\n* * *"}, {"input": "4 3\n    10 20 30 40\n    2\n    34\n    34", "output": "70\n    60\n    60"}]