/*
1. 偶數個人
2. 人多,邊少
3. 站在對角線
*/
#include<iostream>
#include<vector>
#include<set>
using namespace std;
typedef pair<int,int> pii;
int N, M, Q, total; // total=>總人數
vector<int> cl, ccl; // clockwise(1,2,3), counterclockwise(-3,-2,-1)
int dist(int s, int t) {
return min(abs(s-t), total-abs(s-t));
}
int op(int x) {
if(x<N) return x+N;
return x-N;
}
int main() {
cin>>N>>M>>Q;
total = 2*N;
for(int i=0; i<M; i++) {
int k; cin>>k;
cl.push_back(k);
}
for(int i=0; i<M; i++) cl.push_back(cl[i]+N);
for(int i=cl.size()-1; i>=0; i--) ccl.push_back(-cl[i]);
while(Q--) {
int s, t;
cin>>s>>t;
cout<<min(dist(s, t), dist(op(s), t)+1)<<'\n';
}
}