# 2042번. 구간 합 구하기
importsysinput=sys.stdin.readlinedefinit(start,end,node):# 세그먼트 트리 만들기
ifstart==end:tree[node]=nList[start]returntree[node]mid=(start+end)//2tree[node]=init(start,mid,node*2)+init(mid+1,end,node*2+1)returntree[node]# 구간 합 구하기
defsummit(start,end,node,left,right):# left 와 right가 범위에서 벗어났기 떄문에 return
ifleft>endorright<start:return0ifleft<=startandend<=right:returntree[node]mid=(start+end)//2returnsummit(start,mid,node*2,left,right)+summit(mid+1,end,node*2+1,left,right)# 특정 인덱스 값 바꾸기
defupdate(start,end,node,index,diff):ifindex<startorindex>end:returntree[node]+=diffifstart==end:returnmid=(start+end)//2update(start,mid,node*2,index,diff)update(mid+1,end,node*2+1,index,diff)n,m,k=map(int,input().split())nList=[]tree=[0]*((4*n))foriinrange(n):nList.append(int(input()))init(0,n-1,1)foriinrange(m+k):cmd=list(map(int,input().split()))ifcmd[0]==1:cmd[1]-=1diff=cmd[2]-nList[cmd[1]]nList[cmd[1]]=cmd[2]update(0,n-1,1,cmd[1],diff)elifcmd[0]==2:print(summit(0,n-1,1,cmd[1]-1,cmd[2]-1))