N = int(eval(input()))

Ts = [int(x) for x in input().split()]

M = int(eval(input()))

for i in range(M):

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

    time = 0

    for j in range(N):

        if j == (p-1):

            time += x

        else:

            time += Ts[j]

    print(time)

eval(input())

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

M = int(eval(input()))

S = sum(T)



for i in range(M):

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

    ans = S-T[p-1]+x

    print(ans)
N = int(eval(input()))
Ts = [int(x) for x in input().split()]
M = int(eval(input()))
for i in range(M):
    p, x = list(map(int, input().split()))
    time = 0
    for j in range(N):
        if j == (p - 1):
            time += x
        else:
            time += Ts[j]
    print(time)

eval(input())
T = list(map(int, input().split()))
M = int(eval(input()))
S = sum(T)
for i in range(M):
    p, x = list(map(int, input().split()))
    ans = S - T[p - 1] + x
    print(ans)

-N = int(eval(input())) -Ts = [int(x) for x in input().split()] +eval(input()) +T = list(map(int, input().split())) +S = sum(T) -    time = 0 -    for j in range(N): -        if j == (p - 1): -            time += x -        else: -            time += Ts[j] -    print(time) +    ans = S - T[p - 1] + x +    print(ans)