s=int(eval(input()))

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

b=int(eval(input()))

s=[]

for i in range(b):

    c,d=list(map(int,input().split()))

    s.append(sum(a[:c-1])+sum(a[c:])+d)   

    print((s[i]))
s=int(eval(input()))

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

b=int(eval(input()))

for i in range(b):

    c,d=list(map(int,input().split()))

    print((sum(a[:c-1])+sum(a[c:])+d))   
s = int(eval(input()))
a = list(map(int, input().split()))
b = int(eval(input()))
s = []
for i in range(b):
    c, d = list(map(int, input().split()))
    s.append(sum(a[: c - 1]) + sum(a[c:]) + d)
    print((s[i]))

s = int(eval(input()))
a = list(map(int, input().split()))
b = int(eval(input()))
for i in range(b):
    c, d = list(map(int, input().split()))
    print((sum(a[: c - 1]) + sum(a[c:]) + d))

-s = [] -    s.append(sum(a[: c - 1]) + sum(a[c:]) + d) -    print((s[i])) +    print((sum(a[: c - 1]) + sum(a[c:]) + d))