#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
const ll LOG = 31;
const ll MOD = 1000000007;
const ll inf = 1e17;
const ll B = 2305843009213693951;
#define db(x) cerr << #x << " = " << x << " | "
#define dbg(x) cerr << #x << " = " << x << "\n"
#define Algerian ios::sync_with_stdio(0);
#define OI cin.tie(NULL);
int main() {
Algerian OI
ll n, m, q;
cin >> n >> m >> q;
vector<ll> a(m);
set<ll> s;
for (ll i = 0; i < m; i++) {
cin >> a[i];
s.insert(a[i]);
s.insert(a[i] + n);
}
auto dist = [&](ll a, ll b) -> ll {
if (a > b) swap(a, b);
return min(b - a, 2 * n - (b - a));
};
while (q--) {
ll u, v;
cin >> u >> v;
vector<ll> t;
auto it = s.lower_bound(u);
if (it == s.end()) {
t.push_back(a[0]);
} else {
t.push_back(*it);
}
if (it == s.begin()) {
t.push_back(a[m - 1] + n);
} else {
t.push_back(*(--it));
}
ll res = dist(u, v);
for (auto k : t) {
ll p = (k + n) % (2 * n);
res = min(res, dist(u, k) + dist(p, v) + 1);
res = min(res, dist(u, p) + dist(k, v) + 1);
}
cout << res << "\n";
}
return 0;
}