#include<stdio.h>

typedef long long LL;
LL node[1000001 * 3];

LL update(int target, int value, int _idx, int L, int R)
{
	if (target<L || target>R) return node[_idx];
	if (L == R) return node[_idx] = value;
	int mid = (L + R) / 2;
	return node[_idx] = update(target, value, _idx * 2, L, mid) +
		update(target, value, _idx * 2 + 1, mid + 1, R);
}

LL sum(int s_L, int s_R, int _idx, int L, int R)
{
	if (s_L > R || s_R < L) return 0;
	if (s_L <= L && R <= s_R) return node[_idx];
	int mid = (L + R) / 2;
	return sum(s_L, s_R, _idx * 2, L, mid) +
		sum(s_L, s_R, _idx * 2 + 1, mid + 1, R);
}

int main(void)
{
	int N, M, K, T;
	scanf("%d %d %d", &N, &M, &K);
	for (int i = 1; i <= N; i++) {
		scanf("%d", &T);
		update(i, T, 1, 1, N);
	}

	int n1, n2;
	for (int i = 0; i < M + K; i++) {
		scanf("%d %d %d", &T, &n1, &n2);
		if (T == 2) printf("%lld\n", sum(n1, n2, 1, 1, N));
		else update(n1, n2, 1, 1, N);
	}
}