question_num = int(eval(input()))

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

drink_num = int(eval(input()))

spent_time = sum(Time)

drink =[]

for _ in range(drink_num):

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

    drink.append([p, x])

for p, x in drink:

    print((spent_time - (Time[p - 1] - x)))
question_num = int(eval(input()))

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

drink_num = int(eval(input()))

spent_time = sum(Time)

drink =[]

for _ in range(drink_num):

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

    print((spent_time - (Time[p - 1] - x)))
question_num = int(eval(input()))
Time = list(map(int, input().split()))
drink_num = int(eval(input()))
spent_time = sum(Time)
drink = []
for _ in range(drink_num):
    p, x = list(map(int, input().split()))
    drink.append([p, x])
for p, x in drink:
    print((spent_time - (Time[p - 1] - x)))

question_num = int(eval(input()))
Time = list(map(int, input().split()))
drink_num = int(eval(input()))
spent_time = sum(Time)
drink = []
for _ in range(drink_num):
    p, x = list(map(int, input().split()))
    print((spent_time - (Time[p - 1] - x)))

-    drink.append([p, x]) -for p, x in drink: