/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author verytable
 */

#include <iostream>
#include <fstream>

#include <iostream>
#include <algorithm>

#include <memory>
#include <vector>


struct QueryParams {
};

template<typename T, typename V, typename X>
class SegmentTreeNode { ;
};

struct IntParam : public QueryParams {

};

/*
 * For searching max element in range less or equal than given
 * */
struct BoundedMaxSegmentTreeNode : public SegmentTreeNode<int, int, BoundedMaxSegmentTreeNode> {

};

// T is the type of input array elements
// V is the type of required aggregate statistic
// Node must implement SegmentTreeNode
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 {  // todo make type alias
        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 {

    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;

};


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);
        }

        //std::cout << "upper bounds:\n";
        for (const auto &b: upper_bounds) {
            //std::cout << "bound: " << b.bound << " index: " << b.index << "\n";
        }
        //std::cout << "\n";

        //std::cout << "lower bounds:\n";
        for (const auto &b: lower_bounds) {
            //std::cout << "bound: " << b.bound << " index: " << b.index << "\n";
        }
        //std::cout << "\n";

        //std::cout << "upper bound indices:\n";
        for (auto i: sorted_upper_bound_indices) {
            //std::cout << i << " ";
        }
        //std::cout << "\n";

        //std::cout << "lower bound indices:\n";
        for (auto i: sorted_lower_bound_indices) {
            //std::cout << i << " ";
        }
        //std::cout << "\n";

        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);
            }
        }

        //std::cout << "Zero start sums:\n";
        for (long long zero_start_sum : zero_start_sums) {
            //std::cout << zero_start_sum << " ";
        }
        //std::cout << "\n";

        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::cout << "upper tree built\n";

        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));
        }
        //std::cout << "lower tree built\n";

        //std::cout << "queries:\n";
        for (const auto &q: qs) {
            //std::cout << "query: a = " << q.a << " t = " << q.t << "\n";

            auto upper_bound = find_upper_bound(upper_bounds, q.a);
            //std::cout << "upper bound index = " << upper_bound << "\n";

            auto lower_bound = find_lower_bound(lower_bounds, q.a);
            //std::cout << "lower bound index = " << lower_bound << "\n";

            auto max_rs_index = find_rs_index(rs, q.t);
            //std::cout << "max rs index is " << max_rs_index << "\n";

            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);
                }

                //std::cout << "max upper zeroing is " << max_upper_zeroing << "\n";
                //std::cout << "max lower zeroing is " << max_lower_zeroing << "\n";

                int max_zeroing = std::max(max_upper_zeroing, max_lower_zeroing);
                if (max_zeroing > 0) {
                    start = max_zeroing;
                }
            }

            //std::cout << "start: " << start << "\n";

            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);
                    //std::cout << "is down = " << is_down << "\n";
                    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;
                    //std::cout << "is down: " << is_down << "\n";
                    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];
                            //std::cout << zero_start_sums[max_rs_index + 1] << " " << -zero_start_sums[start] << " " << X << " " << q.t << " " << -rs[max_rs_index] << "\n";
                        }
                        if (answer < 0) {
                            answer = 0;
                        }
                        answer = X - answer;
                    }
                }
            }

            if (max_rs_index >= 0 && max_rs_index % 2 == 0) {
                answer = X - answer;
            }

//            std::cout << "answer is " << answer << "\n";

            out << answer << "\n";

            //std::cout << "\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;
}
