n = int(eval(input()))

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

m = int(eval(input()))

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



for i in px:

  sumt = sum(t) - t[i[0] - 1] + i[1]

  print(sumt)

  
n = int(eval(input()))

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

m = int(eval(input()))

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



total = sum(T)



for p, x in PX:

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

  print(ans)
n = int(eval(input()))
t = list(map(int, input().split()))
m = int(eval(input()))
px = [list(map(int, input().split())) for _ in range(m)]
for i in px:
    sumt = sum(t) - t[i[0] - 1] + i[1]
    print(sumt)

n = int(eval(input()))
T = list(map(int, input().split()))
m = int(eval(input()))
PX = [list(map(int, input().split())) for _ in range(m)]
total = sum(T)
for p, x in PX:
    ans = total - T[p - 1] + x
    print(ans)

-t = list(map(int, input().split())) +T = list(map(int, input().split())) -px = [list(map(int, input().split())) for _ in range(m)] -for i in px: -    sumt = sum(t) - t[i[0] - 1] + i[1] -    print(sumt) +PX = [list(map(int, input().split())) for _ in range(m)] +total = sum(T) +for p, x in PX: +    ans = total - T[p - 1] + x +    print(ans)