N = int(eval(input()))

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

T.insert(0,0)

tot = sum(T)

M = int(eval(input()))

for _ in range(M):

    P,X = list(map(int,input().split()))

    print((tot-T[P]+X))
N = int(eval(input()))

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

T.insert(0,0)

M = int(eval(input()))

X = [list(map(int,input().split())) for _ in range(M)] 

tot = sum(T)

for i in range(M):

    p,x = X[i]

    print((tot-T[p]+x))
N = int(eval(input()))
T = list(map(int, input().split()))
T.insert(0, 0)
tot = sum(T)
M = int(eval(input()))
for _ in range(M):
    P, X = list(map(int, input().split()))
    print((tot - T[P] + X))

N = int(eval(input()))
T = list(map(int, input().split()))
T.insert(0, 0)
M = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(M)]
tot = sum(T)
for i in range(M):
    p, x = X[i]
    print((tot - T[p] + x))

+M = int(eval(input())) +X = [list(map(int, input().split())) for _ in range(M)] -M = int(eval(input())) -for _ in range(M): -    P, X = list(map(int, input().split())) -    print((tot - T[P] + X)) +for i in range(M): +    p, x = X[i] +    print((tot - T[p] + x))