N = int(eval(input()))

T = list(map(int, input().split()))

M = int(eval(input()))

P, X = [], []

for i in range(M):

    p, x = list(map(int, input().split()))

    P.append(p)

    X.append(x)



total_time = sum(T)

abs_diff = 0

for i in range(M):

    index = P[i] - 1

    tmp_diff = X[i] - T[index]

    print((total_time + tmp_diff))
N = int(eval(input()))

T = list(map(int, input().split()))

M = int(eval(input()))

P, X = [], []

for i in range(M):

    p, x = list(map(int, input().split()))

    P.append(p)

    X.append(x)



total_time = sum(T)

for i in range(M):

    index = P[i] - 1

    tmp_diff = X[i] - T[index]

    print((total_time + tmp_diff))
N = int(eval(input()))
T = list(map(int, input().split()))
M = int(eval(input()))
P, X = [], []
for i in range(M):
    p, x = list(map(int, input().split()))
    P.append(p)
    X.append(x)
total_time = sum(T)
abs_diff = 0
for i in range(M):
    index = P[i] - 1
    tmp_diff = X[i] - T[index]
    print((total_time + tmp_diff))

N = int(eval(input()))
T = list(map(int, input().split()))
M = int(eval(input()))
P, X = [], []
for i in range(M):
    p, x = list(map(int, input().split()))
    P.append(p)
    X.append(x)
total_time = sum(T)
for i in range(M):
    index = P[i] - 1
    tmp_diff = X[i] - T[index]
    print((total_time + tmp_diff))

-abs_diff = 0