#include <bits/stdc++.h>
struct QueryParams {};
template <typename T, typename V, typename X>
class SegmentTreeNode {
 public:
  virtual void assignLeaf(T value) = 0;
  virtual void merge(const X &left, const X &right) = 0;
  virtual V getValue() const = 0;
  virtual X query(const std::shared_ptr<QueryParams> &query_params) const {
    throw std::runtime_error("Not implemented");
  };
};
struct IntParam : public QueryParams {
  explicit IntParam(int value) : value(value) {}
  int value = 0;
};
struct BoundedMaxSegmentTreeNode
    : public SegmentTreeNode<int, int, BoundedMaxSegmentTreeNode> {
  static constexpr int kMinLowerBound = -1e9;
  std::vector<int> elements;
  int max;
  void assignLeaf(int value) override { elements = {value}; }
  void merge(const BoundedMaxSegmentTreeNode &left,
             const BoundedMaxSegmentTreeNode &right) override {
    std::merge(left.elements.begin(), left.elements.end(),
               right.elements.begin(), right.elements.end(),
               std::back_inserter(elements));
    max = std::max(left.max, right.max);
  }
  int getValue() const override { return max; }
  BoundedMaxSegmentTreeNode query(
      const std::shared_ptr<QueryParams> &query_params) const override {
    BoundedMaxSegmentTreeNode ret;
    ret.elements = elements;
    auto lower_bound = std::static_pointer_cast<IntParam>(query_params)->value;
    auto pos = std::lower_bound(elements.begin(), elements.end(), lower_bound);
    if (pos != elements.end()) {
      if (*pos == lower_bound) {
        ret.max = lower_bound;
      } else {
        if (pos == elements.begin()) {
          ret.max = kMinLowerBound;
        } else {
          ret.max = *std::prev(pos);
        }
      }
    } else {
      ret.max = elements.back();
    }
    return ret;
  }
};
template <typename T, typename V, typename Node>
class SegmentTree {
 public:
  explicit SegmentTree(const std::vector<T> &arr) : array_size_(arr.size()) {
    nodes_.resize(getSegmentTreeSize());
    buildTree(arr, 1, 0, array_size_ - 1);
  }
  V getValue(size_t lo, size_t hi,
             const std::shared_ptr<QueryParams> &query_params = nullptr) const {
    auto result = getValue(1, 0, array_size_ - 1, lo, hi, query_params);
    return result.getValue();
  }

 private:
  std::vector<Node> nodes_{};
  size_t array_size_;
  void buildTree(const std::vector<T> &arr, size_t stIndex, size_t lo,
                 size_t hi) {
    if (lo == hi) {
      nodes_[stIndex].assignLeaf(arr[lo]);
      return;
    }
    size_t left = 2 * stIndex;
    size_t right = left + 1;
    size_t mid = (lo + hi) / 2;
    buildTree(arr, left, lo, mid);
    buildTree(arr, right, mid + 1, hi);
    nodes_[stIndex].merge(nodes_[left], nodes_[right]);
  }
  Node getValue(
      size_t st_index, size_t left, size_t right, size_t lo, size_t hi,
      const std::shared_ptr<QueryParams> &query_params = nullptr) const {
    if (left == lo && right == hi) {
      if (query_params) {
        return nodes_[st_index].query(query_params);
      } else {
        return nodes_[st_index];
      }
    }
    size_t mid = (left + right) / 2;
    if (lo > mid) {
      return getValue(2 * st_index + 1, mid + 1, right, lo, hi, query_params);
    }
    if (hi <= mid) {
      return getValue(2 * st_index, left, mid, lo, hi, query_params);
    }
    auto left_result = getValue(2 * st_index, left, mid, lo, mid, query_params);
    auto right_result =
        getValue(2 * st_index + 1, mid + 1, right, mid + 1, hi, query_params);
    Node result;
    result.merge(left_result, right_result);
    return result;
  }
  size_t getSegmentTreeSize() {
    size_t size = 1;
    for (; size < array_size_; size <<= 1)
      ;
    return size << 1;
  }
  void update(size_t st_index, size_t lo, size_t hi, size_t index, T value) {
    if (lo == hi) {
      nodes_[st_index].assignLeaf(value);
      return;
    }
    size_t left = 2 * st_index;
    size_t right = left + 1;
    size_t mid = (lo + hi) / 2;
    if (index <= mid) {
      update(left, lo, mid, index, value);
    } else {
      update(right, mid + 1, hi, index, value);
    }
    nodes_[st_index].merge(nodes_[left], nodes_[right]);
  }
};
struct Query {
  Query(long long t, long long a) : t(t), a(a) {}
  long long t;
  long long a;
};
struct IndexedBound {
  IndexedBound(long long int bound, long long int index)
      : bound(bound), index(index) {}
  long long bound;
  long long index;
  bool operator<(const IndexedBound &rhs) const {
    if (bound < rhs.bound) return true;
    if (rhs.bound < bound) return false;
    return index < rhs.index;
  }
};
class TaskF {
 public:
  void solve(std::istream &in, std::ostream &out) {
    size_t X, K;
    in >> X >> K;
    std::vector<long long> rs;
    rs.reserve(K);
    for (int i = 0; i < K; ++i) {
      int r;
      in >> r;
      rs.push_back(r);
    }
    size_t Q;
    in >> Q;
    std::vector<Query> qs;
    qs.reserve(Q);
    for (int i = 0; i < Q; ++i) {
      long long t, a;
      in >> t >> a;
      qs.emplace_back(t, a);
    }
    std::vector<IndexedBound> upper_bounds;
    upper_bounds.reserve(K / 2);
    std::vector<IndexedBound> lower_bounds;
    lower_bounds.reserve(K / 2);
    long long S = X;
    long long P = X - std::max(0ull, X - rs[0]);
    for (int i = 0; i < K; ++i) {
      bool is_even = i % 2 == 0;
      if (i == 0) {
        upper_bounds.emplace_back(std::min(rs[0], (long long)X), 1);
      } else if (is_even) {
        if (rs[i] - rs[i - 1] >= X) {
          upper_bounds.emplace_back(X, i + 1);
        } else {
          if (S - (rs[i] - rs[i - 1]) <= 0) {
            long long to_add = (rs[i] - rs[i - 1]) - S;
            upper_bounds.emplace_back(std::min((long long)X, rs[0] + to_add),
                                      i + 1);
          }
        }
      } else {
        if (rs[i] - rs[i - 1] >= X) {
          lower_bounds.emplace_back(0, i + 1);
        } else {
          if (P - (rs[i] - rs[i - 1]) <= 0) {
            long long to_sub = (rs[i] - rs[i - 1]) - P;
            lower_bounds.emplace_back(std::max(0ull, X - to_sub), i + 1);
          }
        }
      }
      if (i > 0) {
        S = X - std::max(0ll, S - (rs[i] - rs[i - 1]));
        P = X - std::max(0ll, P - (rs[i] - rs[i - 1]));
      }
    }
    std::sort(upper_bounds.begin(), upper_bounds.end());
    std::sort(lower_bounds.begin(), lower_bounds.end());
    std::vector<int> sorted_upper_bound_indices;
    sorted_upper_bound_indices.reserve(upper_bounds.size());
    for (const auto &item : upper_bounds) {
      sorted_upper_bound_indices.push_back(item.index);
    }
    std::vector<int> sorted_lower_bound_indices;
    sorted_lower_bound_indices.reserve(lower_bounds.size());
    for (const auto &item : lower_bounds) {
      sorted_lower_bound_indices.push_back(item.index);
    }
    for (const auto &b : upper_bounds) {
    }
    for (const auto &b : lower_bounds) {
    }
    for (auto i : sorted_upper_bound_indices) {
    }
    for (auto i : sorted_lower_bound_indices) {
    }
    std::vector<long long> zero_start_sums;
    zero_start_sums.reserve(K);
    S = 0;
    zero_start_sums.push_back(S);
    for (int i = 0; i < K; ++i) {
      bool is_even = i % 2 == 0;
      if (is_even) {
        S -= rs[i];
        if (i > 0) {
          S += rs[i - 1];
        }
        zero_start_sums.push_back(S);
      } else {
        S += rs[i] - rs[i - 1];
        zero_start_sums.push_back(S);
      }
    }
    for (long long zero_start_sum : zero_start_sums) {
    }
    std::unique_ptr<SegmentTree<int, int, BoundedMaxSegmentTreeNode>>
        upper_bounds_tree = nullptr;
    if (!sorted_upper_bound_indices.empty()) {
      upper_bounds_tree.reset(
          new SegmentTree<int, int, BoundedMaxSegmentTreeNode>(
              sorted_upper_bound_indices));
    }
    std::unique_ptr<SegmentTree<int, int, BoundedMaxSegmentTreeNode>>
        lower_bounds_tree = nullptr;
    if (!sorted_lower_bound_indices.empty()) {
      lower_bounds_tree.reset(
          new SegmentTree<int, int, BoundedMaxSegmentTreeNode>(
              sorted_lower_bound_indices));
    }
    for (const auto &q : qs) {
      auto upper_bound = find_upper_bound(upper_bounds, q.a);
      auto lower_bound = find_lower_bound(lower_bounds, q.a);
      auto max_rs_index = find_rs_index(rs, q.t);
      long long start = 0;
      if (max_rs_index != -1) {
        int max_upper_zeroing = -1;
        if (upper_bound != -1) {
          auto query_params = std::make_shared<IntParam>(max_rs_index + 1);
          auto res = upper_bounds_tree->getValue(
              upper_bound, sorted_upper_bound_indices.size() - 1, query_params);
          max_upper_zeroing = std::max(res, max_upper_zeroing);
        }
        int max_lower_zeroing = -1;
        if (lower_bound != -1) {
          auto query_params = std::make_shared<IntParam>(max_rs_index + 1);
          auto res = lower_bounds_tree->getValue(0, lower_bound, query_params);
          max_lower_zeroing = std::max(res, max_lower_zeroing);
        }
        int max_zeroing = std::max(max_upper_zeroing, max_lower_zeroing);
        if (max_zeroing > 0) {
          start = max_zeroing;
        }
      }
      long long answer = 0;
      if (start == 0) {
        if (q.t == 0) {
          answer = q.a;
        } else {
          bool is_down = max_rs_index < 0 || (max_rs_index % 2 == 1);
          int index = max_rs_index < 0 ? 0 : max_rs_index + 1;
          answer = q.a + zero_start_sums[index];
          if (is_down) {
            answer -= q.t;
            if (max_rs_index >= 0) {
              answer += rs[max_rs_index];
            }
            if (answer < 0) {
              answer = 0;
            }
          } else {
            answer += q.t;
            if (max_rs_index >= 0) {
              answer -= rs[max_rs_index];
            }
            if (answer < 0) {
              answer = 0;
            }
            answer = X - answer;
          }
        }
      } else {
        if (q.t == rs[start - 1]) {
          answer = X;
        } else {
          bool is_down = (max_rs_index + 1 - start) % 2 == 0;
          if (is_down) {
            if (max_rs_index % 2 == 1) {
              answer = zero_start_sums[max_rs_index + 1];
              answer -= zero_start_sums[start];
              answer += X;
              answer -= q.t;
              answer += rs[max_rs_index];
            } else {
              answer = -zero_start_sums[max_rs_index + 1];
              answer += zero_start_sums[start];
              answer += X;
              answer -= q.t;
              answer += rs[max_rs_index];
            }
            if (answer < 0) {
              answer = 0;
            }
          } else {
            if (max_rs_index % 2 == 1) {
              answer = -zero_start_sums[max_rs_index + 1];
              answer += zero_start_sums[start];
              answer += X;
              answer += q.t;
              answer -= rs[max_rs_index];
            } else {
              answer = zero_start_sums[max_rs_index + 1];
              answer -= zero_start_sums[start];
              answer += X;
              answer += q.t;
              answer -= rs[max_rs_index];
            }
            if (answer < 0) {
              answer = 0;
            }
            answer = X - answer;
          }
        }
      }
      if (max_rs_index >= 0 && max_rs_index % 2 == 0) {
        answer = X - answer;
      }
      out << answer << "\n";
    }
  }
  int find_rs_index(const std::vector<long long> &rs, long long t) {
    auto upper_bound = t;
    auto pos = std::upper_bound(rs.begin(), rs.end(), upper_bound);
    if (pos != rs.end()) {
      if (pos == rs.begin()) {
        return -1;
      } else {
        return (pos - rs.begin()) - 1;
      }
    } else {
      return rs.size() - 1;
    }
  }
  int find_upper_bound(const std::vector<IndexedBound> &upper_bounds,
                       long long a) {
    auto upper_bound = IndexedBound(a - 1, kMaxIndex);
    auto pos =
        std::upper_bound(upper_bounds.begin(), upper_bounds.end(), upper_bound);
    if (pos != upper_bounds.end()) {
      return pos - upper_bounds.begin();
    } else {
      return -1;
    }
  }
  int find_lower_bound(const std::vector<IndexedBound> &lower_bounds,
                       long long a) {
    auto lower_bound = IndexedBound(a, kMaxIndex);
    auto pos =
        std::upper_bound(lower_bounds.begin(), lower_bounds.end(), lower_bound);
    if (pos != lower_bounds.end()) {
      if (pos == lower_bounds.begin()) {
        return -1;
      } else {
        return (pos - lower_bounds.begin()) - 1;
      }
    } else {
      return lower_bounds.size() - 1;
    }
  }

 private:
  static constexpr int kMaxIndex = 2 * 1e9;
};
int main() {
  TaskF solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}
