#include <bits/stdc++.h>
using namespace std;
int n;
int dist(int x, int y){
if(x > y) swap(x, y);
return min(y - x, 2 * n - (y - x));
}
int check(int x, int y, int z){
return dist(x, z) + dist((z < n ? z + n : z - n), y) + 1;
}
int main(){
cin.tie(0)->sync_with_stdio(0);
int m, q; cin >> n >> m >> q;
set<int> s;
while(m--){
int k; cin >> k;
s.insert(k);
s.insert(k + n);
}
while(q--){
int x, y; cin >> x >> y;
int ans = dist(x, y);
ans = min(ans, check(x, y, *s.begin()));
ans = min(ans, check(x, y, *s.rbegin()));
if(s.upper_bound(x) != s.begin()) ans = min(ans, check(x, y, *--s.upper_bound(x)));
if(s.lower_bound(x) != s.end()) ans = min(ans, check(x, y, *s.lower_bound(x)));
cout << ans << "\n";
}
return 0;
}