#![allow(unused_imports, dead_code)]
use std::f64::*;
use std::cmp::*;
use std::collections::*;

macro_rules! dump{
    ($($a:expr),*) => {
        println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

const INF: i64 = 0x3f3f3f3f3f3f3f3f;
const MOD: i64 = 1000000007;
const NOTHING: usize = std::usize::MAX;
const DX: [usize; 4] = [1, 0, std::usize::MAX, 0];
const DY: [usize; 4] = [0, 1, 0, std::usize::MAX];

fn main() {
    let x: isize = readln();
    let _: usize = readln();
    let mut rs: Vec<usize> = readln();
    rs.push(std::usize::MAX);
    let q = readln();

    let mut ir = 0;
    let mut f0: isize = 0;
    let mut fx: isize = x;
    let mut flag = true;
    let mut prev = 0;
    let mut diff = 0;
    let mut low = 0;
    let mut high = 0;
    for _ in 0..q {
        let (t, a): (usize, isize) = readln();
        while rs[ir] < t {
            let r = rs[ir];
            let dt = (r - prev) as isize;
            prev = r;
            if flag {
                diff -= dt;
                f0 = max(0, f0 - dt);
                fx = max(0, fx - dt);
                low = min(low, diff);
            } else {
                diff += dt;
                f0 = min(x, f0 + dt);
                fx = min(x, fx + dt);
                high = max(high, diff);
            }
            flag = !flag;
            ir += 1;
        }

        let cur: isize = if a <= max(0, -low) {
            f0
        } else if min(x, x - (high - x)) <= a {
            fx
        } else {
            a + diff
        };
        let dt = (t - prev) as isize;
        let res: isize = if flag {
            max(0, cur - dt)
        } else {
            min(x, cur + dt)
        };
        println!("{}", res);
    }
}

trait Read {
    fn read(s: &str) -> Self;
}

fn readln<T: Read>() -> T {
    let mut buf = String::new();
    std::io::stdin().read_line(&mut buf).unwrap();
    T::read(buf.trim_right())
}

macro_rules! read_impl{
    ($($t:ty)*) => ($(
        impl Read for $t {
            fn read(s: &str) -> $t{
                s.parse().unwrap()
            }
        }
    )*)
}
read_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }

impl Read for String {
    fn read(s: &str) -> Self {
        s.to_string()
    }
}

impl Read for Vec<char> {
    fn read(s: &str) -> Self {
        s.chars().collect()
    }
}

impl<T: Read> Read for Vec<T> {
    fn read(s: &str) -> Self {
        s.split_whitespace().map(T::read).collect()
    }
}

impl<A: Read, B: Read> Read for (A, B) {
    fn read(s: &str) -> Self {
        let tokens: Vec<_> = s.split_whitespace().collect();
        (A::read(tokens[0]), B::read(tokens[1]))
    }
}

impl<A: Read, B: Read, C: Read> Read for (A, B, C) {
    fn read(s: &str) -> Self {
        let tokens: Vec<_> = s.split_whitespace().collect();
        (A::read(tokens[0]), B::read(tokens[1]), C::read(tokens[2]))
    }
}

impl<A: Read, B: Read, C: Read, D: Read> Read for (A, B, C, D) {
    fn read(s: &str) -> Self {
        let tokens: Vec<_> = s.split_whitespace().collect();
        (A::read(tokens[0]), B::read(tokens[1]), C::read(tokens[2]), D::read(tokens[3]))
    }
}
