#include <bits/stdc++.h>
int MM[2] = {469762049, 595591169};
long long power(int a, int k, int md) {
  long long b = a, p = 1;
  while (k) {
    if (k & 1) p = p * b % md;
    b = b * b % md;
    k >>= 1;
  }
  return p;
}
long long wu[2][18 + 1][(1 << 18)], wv[2][18 + 1][(1 << 18)], VV[2], V01;
void init() {
  int g, l, u, v;
  V01 = power(469762049, 595591169 - 2, 595591169);
  for (g = 0; g < 2; g++) {
    int md = MM[g], i;
    u = power(3, md - 1 >> 18, md), v = power(u, md - 2, md);
    VV[g] = power((1 << 18), md - 2, md);
    for (l = 18; l > 0; l--) {
      wu[g][l][0] = wv[g][l][0] = 1;
      for (i = 1; i < 1 << l; i++)
        wu[g][l][i] = wu[g][l][i - 1] * u % md,
        wv[g][l][i] = wv[g][l][i - 1] * v % md;
      u = (long long)u * u % md, v = (long long)v * v % md;
    }
  }
}
void ntt(int *aa, int g, int inverse) {
  int md = MM[g], h, i, j, l, r;
  for (i = 0, j = 1; j < (1 << 18); j++) {
    int n, tmp;
    n = (1 << 18) >> 1;
    while ((i ^= n) < n) n >>= 1;
    if (i < j) tmp = aa[i], aa[i] = aa[j], aa[j] = tmp;
  }
  for (l = 1; l <= 18; l++) {
    int n = 1 << l, m = n >> 1;
    for (h = 0; h < (1 << 18); h += n)
      for (r = 0; r < m; r++) {
        int a, b;
        i = h + r, j = i + m;
        a = aa[i], b = aa[j] * (inverse ? wv[g][l][r] : wu[g][l][r]) % md;
        if ((aa[i] = a + b) >= md) aa[i] -= md;
        if ((aa[j] = a - b) < 0) aa[j] += md;
      }
  }
}
long long garner(int r0, int r1) {
  r1 = (r1 - r0) * V01 % 595591169;
  if (r1 < 0) r1 += 595591169;
  return (long long)r1 * 469762049 + r0;
}
int main() {
  static long long ans[200000 + 1];
  static int aa[100000], bb[100000], aaa[2][2][(1 << 18)], bbb[2][2][(1 << 18)],
      cc[2][(1 << 18)];
  int n, m, q, g, h, h1, h2, i, j, x, y, z, c;
  init();
  scanf("%d%d%d", &n, &m, &q);
  for (i = 0; i < n; i++) scanf("%d", &aa[i]);
  for (j = 0; j < m; j++) scanf("%d", &bb[j]);
  if (n == 1 && m == 1)
    ans[aa[0] + bb[0]] = 1;
  else if (n == 1)
    ans[aa[0] + bb[0]]--, ans[aa[0] + bb[m - 1]]--;
  else if (m == 1)
    ans[aa[0] + bb[0]]--, ans[aa[n - 1] + bb[0]]--;
  else {
    z = aa[0] > aa[1];
    y = bb[0] > bb[1], c = aa[0] + bb[0];
    if (z == y) ans[c]--;
    x = bb[m - 1] >= bb[m - 2], c = aa[0] + bb[m - 1];
    if (z == x) ans[c]--;
    for (j = 1; j < m - 1; j++) {
      x = bb[j] >= bb[j - 1], y = bb[j] > bb[j + 1], c = aa[0] + bb[j];
      if (!z) {
        if (!x && !y)
          ans[c]--;
        else if (x && y)
          ans[c]++;
      } else {
        if (!x && !y)
          ans[c]++;
        else if (x && y)
          ans[c]--;
      }
    }
    z = aa[n - 1] >= aa[n - 2];
    y = bb[0] > bb[1], c = aa[n - 1] + bb[0];
    if (z == y) ans[c]--;
    x = bb[m - 1] >= bb[m - 2], c = aa[n - 1] + bb[m - 1];
    if (z == x) ans[c]--;
    for (j = 1; j < m - 1; j++) {
      x = bb[j] >= bb[j - 1], y = bb[j] > bb[j + 1], c = aa[n - 1] + bb[j];
      if (!z) {
        if (!x && !y)
          ans[c]--;
        else if (x && y)
          ans[c]++;
      } else {
        if (!x && !y)
          ans[c]++;
        else if (x && y)
          ans[c]--;
      }
    }
    z = bb[0] > bb[1];
    for (i = 1; i < n - 1; i++) {
      x = aa[i] >= aa[i - 1], y = aa[i] > aa[i + 1], c = aa[i] + bb[0];
      if (!z) {
        if (!x && !y)
          ans[c]--;
        else if (x && y)
          ans[c]++;
      } else {
        if (!x && !y)
          ans[c]++;
        else if (x && y)
          ans[c]--;
      }
    }
    z = bb[m - 1] >= bb[m - 2];
    for (i = 1; i < n - 1; i++) {
      x = aa[i] >= aa[i - 1], y = aa[i] > aa[i + 1], c = aa[i] + bb[m - 1];
      if (!z) {
        if (!x && !y)
          ans[c]--;
        else if (x && y)
          ans[c]++;
      } else {
        if (!x && !y)
          ans[c]++;
        else if (x && y)
          ans[c]--;
      }
    }
    for (i = 1; i < n - 1; i++) {
      x = aa[i] >= aa[i - 1], y = aa[i] > aa[i + 1];
      if (!x && !y)
        aaa[0][0][aa[i]]++;
      else if (x && y)
        aaa[1][0][aa[i]]++;
    }
    for (j = 1; j < m - 1; j++) {
      x = bb[j] >= bb[j - 1], y = bb[j] > bb[j + 1];
      if (!x && !y)
        bbb[0][0][bb[j]]++;
      else if (x && y)
        bbb[1][0][bb[j]]++;
    }
    for (h = 0; h < 2; h++) {
      memcpy(aaa[h][1], aaa[h][0], sizeof aaa[h][0]);
      for (g = 0; g < 2; g++) ntt(aaa[h][g], g, 0);
    }
    for (h = 0; h < 2; h++) {
      memcpy(bbb[h][1], bbb[h][0], sizeof bbb[h][0]);
      for (g = 0; g < 2; g++) ntt(bbb[h][g], g, 0);
    }
    for (h1 = 0; h1 < 2; h1++)
      for (h2 = 0; h2 < 2; h2++)
        for (g = 0; g < 2; g++) {
          int md = MM[g], d = h1 == h2 ? md - 2 : 2;
          for (i = 0; i < (1 << 18); i++)
            cc[g][i] =
                (cc[g][i] + (long long)aaa[h1][g][i] * bbb[h2][g][i] % md * d) %
                md;
        }
    for (g = 0; g < 2; g++) {
      int md;
      long long v;
      ntt(cc[g], g, 1);
      md = MM[g], v = VV[g];
      for (i = 0; i < (1 << 18); i++) cc[g][i] = (long long)cc[g][i] * v % md;
    }
    for (i = 0; i <= 200000; i++) {
      long long x = garner(cc[0][i], cc[1][i]);
      if (x > (long long)469762049 * 595591169 - x)
        x -= (long long)469762049 * 595591169;
      ans[i] += x;
    }
  }
  ans[0]++;
  for (i = 1; i <= 200000; i++) ans[i] += ans[i - 1];
  while (q--) {
    int x;
    scanf("%d", &x);
    printf("%lld\n", ans[x - 1]);
  }
  return 0;
}
