
import Control.Monad (forM_)
import qualified Data.Vector as V

data LR = L | R
bsBase lr sat res x xs =
  let go = case lr of
              L -> goL
              R -> goR
  in go x xs (-1) (V.length xs)
  where
    goL x xs l r
      | l==r-1 = res l
      | sat m = goL x xs m r
      | otherwise = goL x xs l m
      where m = (l+r) `div` 2
    goR x xs l r
      | l==r-1 = res r
      | sat m = goR x xs l m
      | otherwise = goR x xs m r
      where m = (l+r) `div` 2

bsLower x xs = bsBase R (\i-> x<=(xs V.! i)) id x xs

v !* i
  | i==(-1) = -10^11
  | i==(V.length v) = 10^11
  | otherwise = v V.! i

a # b = abs (a-b)

solv ss ts qs = forM_ qs calc where
  cost x s t = min ((x#s)+(s#t)) ((x#t)+(t#s))
  calc q =
    let sl = bsLower q ss
        tl = bsLower q ts
    in print $! minimum [cost q (ss !* i) (ts !* j) | i<-[sl,sl-1], j<-[tl,tl-1]]

main = do
  [a,b,q] <- map read . words <$> getLine :: IO [Int]
  ys <- V.fromList . map read . words <$> getContents :: IO (V.Vector Int)
  let ss = V.slice 0 a ys
      ts = V.slice a b ys
      qs = V.slice (a+b) q ys
  solv ss ts qs
