#include<bits/stdc++.h>
#define int long long
#define mid ((l+r)>>1)
#define ls (u<<1)
#define rs (u>>1)
using namespace std;
const int N=2e5+8;
inline int read(){
	char c=getchar();int s=0;
	while(c<'0'||c>'9')c=getchar();
	while(c>='0'&&c<='9'){
		s=s*10+c-'0';c=getchar();
	}return s;
}
struct node{
	int next,to,dis,from;
}a[N*2];
int head[N],cnt=1,n,m,qq,x,y,z;
struct No{
	int id,val;
	bool operator<(const No&x)const{
		return val>x.val;
	}
};
priority_queue<No>q;
int pd[N],dis[N],pre[N],dl[N],dr[N],bj[N],pb[N],rr[N],ll[N],tot,pl[N],pr[N],summ[N*4];
void add(int e,int r,int t){
	a[++cnt]={head[e],r,t,e};head[e]=cnt;
}
void dfs(int u){
	if(!pre[u])return ;
	dfs(a[pre[u]].from);
	pb[pre[u]]=pb[(pre[u]^1)]=++tot;
	rr[a[pre[u]].from]=ll[u]=pb[pre[u]];
	bj[u]=1;
}
void diji(){
	memset(dis,10,sizeof(dis));
	q.push((No){1,0});dis[1]=0;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dis[a[i].to]>dis[u.id]+a[i].dis){
				dis[a[i].to]=dis[u.id]+a[i].dis;pre[a[i].to]=i;
				q.push((No){a[i].to,dis[a[i].to]});
			}
		}
	}
	dfs(n);bj[1]=1;
}
void dijis(){
	memset(pd,0,sizeof(pd));memset(dl,10,sizeof(dl));
	dl[1]=0;q.push((No){1,0});pl[1]=1;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dl[a[i].to]>dl[u.id]+a[i].dis){
				dl[a[i].to]=dl[u.id]+a[i].dis;
				if(!bj[a[i].to])pl[a[i].to]=pl[u.id];
				else pl[a[i].to]=a[i].to;
				q.push((No){a[i].to,dis[a[i].to]});
			}
		}
	}
}
void dijist(){
	memset(pd,0,sizeof(pd));memset(dr,10,sizeof(dr));
	dr[n]=0;q.push((No){n,0});pr[n]=n;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dr[a[i].to]>dr[u.id]+a[i].dis){
				dr[a[i].to]=dr[u.id]+a[i].dis;
				if(!bj[a[i].to])pr[a[i].to]=pr[u.id];
				else pr[a[i].to]=a[i].to;
			//	cout<<"***"<<u.id<<" "<<a[i].to<<pr[a[i].to]<<endl;
				q.push((No){a[i].to,dis[a[i].to]});
			}
		}
	}
}
void add(int u,int l,int r,int L,int R,int k){
//	cout<<"---"<<L<<" "<<R<<" "<<k<<endl;
//	return ;
	if(L<=l&&R>=r){summ[u]=min(summ[u],k);return ;}
	if(L<=mid)add(u,l,mid,L,R,k);
	if(R>mid)add(u,mid+1,r,L,R,k);
}
int query(int u,int l,int r,int L,int R){
	int ans=summ[u];
	if(L<=l&&R>=r)return ans;
	if(L<=mid)ans=min(ans,query(ls,l,mid,L,R));
	if(R>mid)ans=min(ans,query(rs,mid+1,r,L,R));
	return ans;
}
signed main()
{
	n=read();m=read();qq=read();
	for(int i=1;i<=m;i++){
		x=read();y=read();z=read();
		add(x,y,z);add(y,x,z);
	}
	diji();

	dijis();
	dijist();
	memset(summ,10,sizeof(summ));
//	for(int i=1;i<=cnt;i++){
//		cout<<pd[i]<<"---"<<endl;
//	}
	for(int i=1;i<=n;i++){
//		cout<<pl[i]<<" "<<pr[i]<<"***"<<ll[i]<<" "<<rr[i]<<endl;
	}
//	return 0;
	for(int i=1;i<=cnt;i++){
		if(pb[i])continue;
	//	cout<<a[i].from<<" "<<a[i].to<<" "<<pl[a[i].from]<<" "<<pr[a[i].to]<<endl;
		if(rr[pl[a[i].from]]<=ll[pr[a[i].to]]&&rr[pl[a[i].from]])add(1,1,n,rr[pl[a[i].from]],ll[pr[a[i].to]],a[i].dis+dl[a[i].from]+dr[a[i].to]);
	//	if(rr[pl[a[i].to]]<=ll[pr[a[i].from]])add(1,1,n,rr[pl[a[i].to]],ll[pr[a[i].from]],a[i].dis+dl[a[i].to]+dr[a[i].from]);
	}
	for(int i=1;i<=qq;i++){
		x=read();y=read();
		int u=x*2+1;
	//	cout<<pb[u]<<endl;
		if(pb[u])
		{
			if(y<a[u].dis)printf("%d\n",dis[n]-(a[u].dis-y));
			else printf("%d\n",min(query(1,1,n,pb[u],pb[u]),dis[n]+(y-a[u].dis)));
		}
		else
		{
			if(y>a[u].dis)printf("%d\n",dis[n]);
			else printf("%d\n",min(dis[n],min(dl[a[u].from]+y+dr[a[u].to],dl[a[u].to]+dr[a[u].from]+y)));
		}
	}
/*	for(int i=1;i<=n;i++){
		cout<<pl[i]<<" "<<pr[i]<<endl;
	}*/
	return 0;
}


#include<bits/stdc++.h>
#define int long long
#define mid ((l+r)>>1)
#define ls (u<<1)
#define rs (u>>1)
using namespace std;
const int N=8e5+8;
inline int read(){
	char c=getchar();int s=0;
	while(c<'0'||c>'9')c=getchar();
	while(c>='0'&&c<='9'){
		s=s*10+c-'0';c=getchar();
	}return s;
}
struct node{
	int next,to,dis,from;
}a[N*2];
int head[N],cnt=1,n,m,qq,x,y,z;
const long long INF=9e17;
struct No{
	long long id,val;
	bool operator<(const No&x)const{
		return val>x.val;
	}
};
priority_queue<No>q;
int pd[N],dis[N],pre[N],dl[N],dr[N],bj[N],pb[N],rr[N],ll[N],tot,pl[N],pr[N],summ[N*4];
void add(int e,int r,int t){
	a[++cnt]={head[e],r,t,e};head[e]=cnt;
}
void dfs(int u){
	if(!pre[u])return ;
	dfs(a[pre[u]].from);
	pb[pre[u]]=pb[(pre[u]^1)]=++tot;
	rr[a[pre[u]].from]=ll[u]=pb[pre[u]];
	bj[u]=1;pl[u]=pr[u]=u;
}
void diji(){
	for(int i=1;i<=n;i++)dis[i]=INF;
	q.push((No){1,0});dis[1]=0;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dis[a[i].to]>dis[u.id]+a[i].dis){
				dis[a[i].to]=dis[u.id]+a[i].dis;pre[a[i].to]=i;
				q.push((No){a[i].to,dis[a[i].to]});
			}
		}
	}
	dfs(n);bj[1]=1;pr[1]=pl[1]=1;
}
void dijis(){
	for(int i=1;i<=n;i++)dl[i]=INF,pd[i]=0;
	dl[1]=0;q.push((No){1,0});pl[1]=1;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dl[a[i].to]>dl[u.id]+a[i].dis){
				dl[a[i].to]=dl[u.id]+a[i].dis;
				if(!bj[a[i].to])pl[a[i].to]=pl[u.id];
				else pl[a[i].to]=a[i].to;
				q.push((No){a[i].to,dl[a[i].to]});
			}
		}
	}
}
void dijist(){
	for(int i=1;i<=n;i++)dr[i]=INF,pd[i]=0;
	dr[n]=0;q.push((No){n,0});pr[n]=n;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dr[a[i].to]>dr[u.id]+a[i].dis){
				dr[a[i].to]=dr[u.id]+a[i].dis;
				if(!bj[a[i].to])pr[a[i].to]=pr[u.id];
				else pr[a[i].to]=a[i].to;
			//	cout<<"***"<<u.id<<" "<<a[i].to<<pr[a[i].to]<<endl;
				q.push((No){a[i].to,dr[a[i].to]});
			}
		}
	}
}
bool flag=0;
void add(int u,int l,int r,int L,int R,int k){
//	cout<<"---"<<L<<" "<<R<<" "<<k<<endl;
//	return ;
	if(L<=l&&R>=r)
	{
//	cout<<u<<" "<<l<<" "<<r<<" "<<L<<" "<<R<<" "<<k<<"/*-"<<endl;
	summ[u]=min(summ[u],k);return ;
	}
	if(L<=mid)add(ls,l,mid,L,R,k);
	if(R>mid)add(rs,mid+1,r,L,R,k);
}
int query(int u,int l,int r,int L,int R){
	int ans=summ[u];
//	if(flag)cout<<ans<<"///"<<endl;
	if(L<=l&&R>=r)return ans;
	if(L<=mid)ans=min(ans,query(ls,l,mid,L,R));
	if(R>mid)ans=min(ans,query(rs,mid+1,r,L,R));
	return ans;
}
int tq=0;
int jx[N],jy[N],jz[N];
void build(int u,int l,int r){
	summ[u]=INF;
	if(l==r){
		return ;
	}
	build(ls,l,mid);
	build(rs,mid+1,r);
}
signed main()
{
	n=read();m=read();qq=read();
	for(int i=1;i<=m;i++){
		x=read();y=read();z=read();
		if(i==1)tq=x;
		jx[i]=x;jy[i]=y;jz[i]=z;
		add(x,y,z);add(y,x,z);
	}
	diji();

	dijis();
	dijist();
	build(1,1,tot);

	for(int i=2;i<=cnt;i++){
		if(pb[i])continue;
		if(rr[pl[a[i].from]]<=ll[pr[a[i].to]]&&rr[pl[a[i].from]])add(1,1,tot,rr[pl[a[i].from]],ll[pr[a[i].to]],a[i].dis+dl[a[i].from]+dr[a[i].to]);
	}
	for(int i=1;i<=qq;i++){
		x=read();y=read();
		int u=x*2+1;
		if(pb[u])
		{
	//		cout<<"***"<<i<<" "<<pb[u]<<endl;
		/*	if(i==2){
				flag=1;
			}*/
			if(y<a[u].dis){printf("%lld\n",dis[n]-(a[u].dis-y));}
			else{printf("%lld\n",min(query(1,1,tot,pb[u],pb[u]),dis[n]+(y-a[u].dis)));}
		}
		else
		{
			if(y>a[u].dis){printf("%lld\n",dis[n]);}
			else{printf("%lld\n",min(dis[n],min(dl[a[u].from]+y+dr[a[u].to],dl[a[u].to]+dr[a[u].from]+y)));}
		}

	}
	return 0;
}


#include<cstdio>
#include<queue>
#include<iostream>
using namespace std;
struct edge{
	int id,to,next; long long w;
}q[400101];
struct lss{
	int u,v; long long w;
}r[401001];
struct ls{
	int id; long long dis;
	bool operator<(const ls &x)const{
		return x.dis<dis;
	}
};
int head[201010],cnt,n,m,qaq;
long long rd[201010],ld[201010],disl[210101],disr[201010];
int pre[210101];//左右最短路
int idest[201010],pcnt,visp[210101];//最短路
long long dist[201010];
void add(int x,int y,long long z,int a){
	q[++cnt] = (edge){a,y,head[x],z}; head[x] = cnt;
}
priority_queue<ls> qq;
void dij(int u,long long dis[],int flag){
	for(int i=1;i<=n;++i)
	  dis[i]=1e18;
	dis[u]=0;
	qq.push((ls){u,0});
	while(!qq.empty()){
		ls tmp=qq.top();
		qq.pop();
		int x=tmp.id;
		long long dw=tmp.dis;
		if(dw>dis[x]) continue;
		for(int i=head[x];i;i=q[i].next){
			int v=q[i].to;
			if(dis[v]>q[i].w+dw){
				pre[v]=q[i].id;
				dis[v]=q[i].w+dw;
				if(flag==1&&!visp[v]) ld[v]=ld[x];//更新ld，ld一定指向自己的前驱
				if(flag==2&&!visp[v]) rd[v]=rd[x];//同理（第二遍是从N到1）
				qq.push((ls){v,dis[v]});
			}
		}
	}
}
#define ls (rt<<1)
#define rs (rt<<1|1)
#define mid (l+r>>1)
#define lson ls,l,mid
#define rson rs,mid+1,r
long long tr[1101010];
void build(int rt,int l,int r){
	tr[rt]=1e18;
  if(l==r) return;
  build(lson);
  build(rson);
}
void update(int rt,int l,int r,int L,int R,long long x){
	if(L>R) return;
	if(L<=l&&r<=R){
		tr[rt]=min(tr[rt],x);
		return;
	}
	if(L<=mid) update(lson,L,R,x);
	if(R>mid) update(rson,L,R,x);
}
long long query(int rt,int l,int r,int x){
	if(l==r) return tr[rt];
	long long res=tr[rt];
	if(x<=mid) res=min(res,query(lson,x));
	if(x>mid) res=min(res,query(rson,x));
	return res;
}
int main(){
	scanf("%d%d%d",&n,&m,&qaq);
	for(int i=1;i<=m;++i){
	  	scanf("%d%d%d",&r[i].u,&r[i].v,&r[i].w);//记录边的ID，就不用再异或搞了!!!读入时为了方便（可能也是迫不得已）人为地规定成有向边；
	  	add(r[i].u,r[i].v,r[i].w,i);
	  	add(r[i].v,r[i].u,r[i].w,i);
	  	idest[i]=-1;//先都置为-1；
	  }
  dij(n,dist,10);//先跑一遍求最短路
	visp[1]=1;//visp指是否在最短路上（点）
	ld[1]=rd[1]=0;//
	int v=1;
	for(int i=1;v!=n;++i){
	  	int ve=pre[v];//pre是由下标（点） 指向数值（边）
	  	pcnt++;//记录最短路径的边数
	  	idest[ve]=i;///idin指最短路径上边的编号(边)
	  	v=r[ve].v^v^r[ve].u;//向前找最短路径！！！因为结构体存成了无向边，所以有可能在最短路上乱跳，
	  	//而v一定与r[ve].u和r[ve].v其中的一个相同，所以异或操作后一定是剩下的一个，即v指向的点，于是就可以找路径了。
	  	visp[v]=1;//在最短路上了
	  	ld[v]=rd[v]=i;//ld,rd存的都是编号(边)，在最短路径上的边一定指向的是最短路上.
	  }
	dij(1,disl,1);//更新ld左
	dij(n,disr,2);//更新rd右
	build(1,1,pcnt);//在最短路径上建树
	//cout<<1;
	for(int i=1;i<=m;++i){
		if(idest[i]==-1){//对于不在最短路上的边

			update(1,1,pcnt,ld[r[i].u]+1,rd[r[i].v],disl[r[i].u]+r[i].w+disr[r[i].v]);//因为ld,rd表示链接到此边的编号，所以是跑完ld，跑到lr，所以左开右闭；
			update(1,1,pcnt,ld[r[i].v]+1,rd[r[i].u],disl[r[i].v]+r[i].w+disr[r[i].u]);
		}
	}
	//cout<<dist[1];
	while(qaq--){
		int t;
		long long lent,ans=disl[n];
		scanf("%d%lld",&t,&lent);
		if(~idest[t]){
			ans=disl[n]-r[t].w+lent;
			if(lent>r[t].w)
			  ans=min(ans,query(1,1,pcnt,idest[t]));
		}
		else {
			if(lent<r[t].w)
				ans=min(ans,min(disr[r[t].u]+disl[r[t].v]+lent,disl[r[t].u]+disr[r[t].v]+lent));
		}
	  printf("%lld\n",ans);
	}
}


#include<bits/stdc++.h>
#define int long long
#define mid ((l+r)>>1)
#define ls (u<<1)
#define rs (u<<1|1)
using namespace std;
const int N=8e5+8;
inline int read(){
	char c=getchar();int s=0;
	while(c<'0'||c>'9')c=getchar();
	while(c>='0'&&c<='9'){
		s=s*10+c-'0';c=getchar();
	}return s;
}
struct node{
	int next,to,dis,from;
}a[N*2];
int head[N],cnt=1,n,m,qq,x,y,z;
const long long INF=9e17;
struct No{
	long long id,val;
	bool operator<(const No&x)const{
		return val>x.val;
	}
};
priority_queue<No>q;
int pd[N],dis[N],pre[N],dl[N],dr[N],bj[N],pb[N],rr[N],ll[N],tot,pl[N],pr[N],summ[N*4];
void add(int e,int r,int t){
	a[++cnt]={head[e],r,t,e};head[e]=cnt;
}
void dfs(int u){
	if(!pre[u])return ;
	dfs(a[pre[u]].from);
	pb[pre[u]]=pb[(pre[u]^1)]=++tot;
	rr[a[pre[u]].from]=ll[u]=pb[pre[u]];
	bj[u]=1;pl[u]=pr[u]=u;
}
void diji(){
	for(int i=1;i<=n;i++)dis[i]=INF;
	q.push((No){1,0});dis[1]=0;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dis[a[i].to]>dis[u.id]+a[i].dis){
				dis[a[i].to]=dis[u.id]+a[i].dis;pre[a[i].to]=i;
				q.push((No){a[i].to,dis[a[i].to]});
			}
		}
	}
	dfs(n);bj[1]=1;pr[1]=pl[1]=1;
}
void dijis(){
	for(int i=1;i<=n;i++)dl[i]=INF,pd[i]=0;
	dl[1]=0;q.push((No){1,0});pl[1]=1;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dl[a[i].to]>dl[u.id]+a[i].dis){
				dl[a[i].to]=dl[u.id]+a[i].dis;
				if(!bj[a[i].to])pl[a[i].to]=pl[u.id];
				else pl[a[i].to]=a[i].to;
				q.push((No){a[i].to,dl[a[i].to]});
			}
		}
	}
}
void dijist(){
	for(int i=1;i<=n;i++)dr[i]=INF,pd[i]=0;
	dr[n]=0;q.push((No){n,0});pr[n]=n;
	while(!q.empty()){
		No u=q.top();q.pop();
		if(pd[u.id])continue;
		pd[u.id]=1;
		for(int i=head[u.id];i;i=a[i].next){
			if(dr[a[i].to]>dr[u.id]+a[i].dis){
				dr[a[i].to]=dr[u.id]+a[i].dis;
				if(!bj[a[i].to])pr[a[i].to]=pr[u.id];
				else pr[a[i].to]=a[i].to;
			//	cout<<"***"<<u.id<<" "<<a[i].to<<pr[a[i].to]<<endl;
				q.push((No){a[i].to,dr[a[i].to]});
			}
		}
	}
}
bool flag=0;
void add(int u,int l,int r,int L,int R,int k){
//	cout<<"---"<<L<<" "<<R<<" "<<k<<endl;
//	return ;
	if(L<=l&&R>=r)
	{
	summ[u]=min(summ[u],k);return ;
	}
	if(L<=mid)add(ls,l,mid,L,R,k);
	if(R>mid)add(rs,mid+1,r,L,R,k);
}
int query(int u,int l,int r,int L,int R){
	int ans=summ[u];
//	if(flag)cout<<ans<<"///"<<endl;
	if(L<=l&&R>=r)return ans;
	if(L<=mid)ans=min(ans,query(ls,l,mid,L,R));
	if(R>mid)ans=min(ans,query(rs,mid+1,r,L,R));
	return ans;
}
int tq=0;
int jx[N],jy[N],jz[N];
void build(int u,int l,int r){
	summ[u]=INF;
	if(l==r){
		return ;
	}
	build(ls,l,mid);
	build(rs,mid+1,r);
}
signed main()
{
	n=read();m=read();qq=read();
	for(int i=1;i<=m;i++){
		x=read();y=read();z=read();
		if(i==1)tq=x;
		jx[i]=x;jy[i]=y;jz[i]=z;
		add(x,y,z);add(y,x,z);
	}
	diji();

	dijis();
	dijist();
	build(1,1,tot);

	for(int i=2;i<=cnt;i++){
		if(pb[i])continue;
		if(rr[pl[a[i].from]]<=ll[pr[a[i].to]]&&rr[pl[a[i].from]])add(1,1,tot,rr[pl[a[i].from]],ll[pr[a[i].to]],a[i].dis+dl[a[i].from]+dr[a[i].to]);
	}
	for(int i=1;i<=qq;i++){
		x=read();y=read();
		int u=x*2+1;
		if(pb[u])
		{
	//		cout<<"***"<<i<<" "<<pb[u]<<endl;
			if(y<a[u].dis){printf("%lld\n",dis[n]-(a[u].dis-y));}
			else{printf("%lld\n",min(query(1,1,tot,pb[u],pb[u]),dis[n]+(y-a[u].dis)));}
		}
		else
		{
			if(y>a[u].dis){printf("%lld\n",dis[n]);}
			else{printf("%lld\n",min(dis[n],min(dl[a[u].from]+y+dr[a[u].to],dl[a[u].to]+dr[a[u].from]+y)));}
		}

	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN=2e5+5;
const int MAXM=2e5+5;
const ll Inf=1e18;

struct Original_Edge{
	int u,v;ll len;
}oe[MAXM];
struct Node{
	int pos;
	ll dis;
	inline bool operator<(const Node &x)const{
		return x.dis<dis;
	}
};
struct Edge{
	int id,to,nxt;
	ll len;
}e[MAXM<<1];
int cnt,head[MAXN];
inline void add_edge(int id,int u,int v,ll len){
	e[++cnt].id=id;e[cnt].to=v;e[cnt].nxt=head[u];e[cnt].len=len;head[u]=cnt;
}
int n,m,q;
int ind[MAXN];
int lstvis[MAXN];

int path_cnt,l[MAXN],r[MAXN];
bool On_path[MAXN];

ll disS[MAXN],disT[MAXN];
priority_queue<Node> pq;

ll t[MAXM<<4];
inline void Dijkstra(int s,ll dis[],int f=0){
	for(int i=1;i<=n;++i) dis[i]=Inf;
	dis[s]=0;
	pq.push((Node){s,0});
	while(!pq.empty()){
		Node fa=pq.top();pq.pop();

		int x=fa.pos;
		if(fa.dis>dis[x]) continue;
		for(int i=head[x],y;i;i=e[i].nxt){
			y=e[i].to;
			if(dis[y]>fa.dis+e[i].len){
				lstvis[y]=e[i].id;
				dis[y]=fa.dis+e[i].len;
				if(f==1&&!On_path[y]) l[y]=l[x];
				if(f==2&&!On_path[y]) r[y]=r[x];
				pq.push((Node){y,dis[y]});
			}
		}
	}
}

inline void Trace(){
	On_path[1]=true;
	l[1]=1;r[1]=0;

	int cur=1;
	for(int i=1;cur!=n;++i){
		int Edge_id=lstvis[cur];
		ind[Edge_id]=i;
		++path_cnt;
		cur=oe[Edge_id].u^oe[Edge_id].v^cur;
		On_path[cur]=true;
		l[cur]=i+1;r[cur]=i;
	}
}

inline void Build(int k,int l,int r){
	t[k]=Inf;
	if(l==r) return;
	int mid=(l+r)>>1;
	Build(k<<1,l,mid);
	Build(k<<1|1,mid+1,r);
}
inline void Update(int k,int l,int r,int x,int y,ll v){
	if(x>y) return;
	if(x<=l&&r<=y){
		t[k]=min(t[k],v);
		return;
	}
	int mid=(l+r)>>1;
	if(x<=mid) Update(k<<1,l,mid,x,y,v);
	if(y>mid) Update(k<<1|1,mid+1,r,x,y,v);
}

inline ll Query(int k,int l,int r,int x){
	if(l==r) return t[k];
	int mid=(l+r)>>1;
	ll res=t[k];
	if(x<=mid) res=min(res,Query(k<<1,l,mid,x));
	else res=min(res,Query(k<<1|1,mid+1,r,x));
	return res;
}
int main(){
	ios::sync_with_stdio(0);
	cin>>n>>m>>q;
	for(int i=1;i<=m;++i){
		cin>>oe[i].u>>oe[i].v>>oe[i].len;
		add_edge(i,oe[i].u,oe[i].v,oe[i].len);
		add_edge(i,oe[i].v,oe[i].u,oe[i].len);
		ind[i]=-1;
	}

	Dijkstra(n,disT);
	Trace();
	Dijkstra(1,disS,1);
	Dijkstra(n,disT,2);

	Build(1,1,path_cnt);
	for(int i=1;i<=m;++i){
		if(ind[i]==-1){
			Update(1,1,path_cnt,l[oe[i].u],r[oe[i].v],disS[oe[i].u]+oe[i].len+disT[oe[i].v]);
			Update(1,1,path_cnt,l[oe[i].v],r[oe[i].u],disS[oe[i].v]+oe[i].len+disT[oe[i].u]);
		}
	}
	for(int i=1;i<=q;++i){
		int Edge_id;ll New_len,ans=disS[n];
		cin>>Edge_id>>New_len;
		if(ind[Edge_id]!=-1){
			ans=disS[n]-oe[Edge_id].len+New_len;
			if(New_len>oe[Edge_id].len)
				ans=min(ans,Query(1,1,path_cnt,ind[Edge_id]));
		}
		else{
			if(New_len<oe[Edge_id].len){
				ans=min(ans,disS[oe[Edge_id].u]+New_len+disT[oe[Edge_id].v]);
				ans=min(ans,disS[oe[Edge_id].v]+New_len+disT[oe[Edge_id].u]);
			}
		}
		cout<<ans<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN=2e5+5;
const int MAXM=2e5+5;
const ll Inf=1e18;

struct Original_Edge{
	int u,v;ll len;
}oe[MAXM];
struct Node{
	int pos;
	ll dis;
	inline bool operator<(const Node &x)const{
		return x.dis<dis;
	}
};
struct Edge{
	int id,to,nxt;
	ll len;
}e[MAXM<<1];
int cnt,head[MAXN];
inline void add_edge(int id,int u,int v,ll len){
	e[++cnt].id=id;e[cnt].to=v;e[cnt].nxt=head[u];e[cnt].len=len;head[u]=cnt;
}
int n,m,q;
int ind[MAXN];
int lstvis[MAXN];

int path_cnt,l[MAXN],r[MAXN];
bool On_path[MAXN];

ll disS[MAXN],disT[MAXN];
priority_queue<Node> pq;

ll t[MAXM<<4];
inline void Dijkstra(int s,ll dis[],int f=0){
	for(int i=1;i<=n;++i) dis[i]=Inf;
	dis[s]=0;
	pq.push((Node){s,0});
	while(!pq.empty()){
		Node fa=pq.top();pq.pop();

		int x=fa.pos;
		if(fa.dis>dis[x]) continue;
		for(int i=head[x],y;i;i=e[i].nxt){
			y=e[i].to;
			if(dis[y]>fa.dis+e[i].len){
				lstvis[y]=e[i].id;
				dis[y]=fa.dis+e[i].len;
				if(f==1&&!On_path[y]) l[y]=l[x];
				if(f==2&&!On_path[y]) r[y]=r[x];
				pq.push((Node){y,dis[y]});
			}
		}
	}
}

inline void Trace(){
	On_path[1]=true;
	l[1]=r[1]=0;

	int cur=1;
	for(int i=1;cur!=n;++i){
		int Edge_id=lstvis[cur];
		ind[Edge_id]=i;
		++path_cnt;
		cur=oe[Edge_id].u^oe[Edge_id].v^cur;
		On_path[cur]=true;
		l[cur]=r[cur]=i;
	}
}

inline void Build(int k,int l,int r){
	t[k]=Inf;
	if(l==r) return;
	int mid=(l+r)>>1;
	Build(k<<1,l,mid);
	Build(k<<1|1,mid+1,r);
}
inline void Update(int k,int l,int r,int x,int y,ll v){
	if(x>y) return;
	if(x<=l&&r<=y){
		t[k]=min(t[k],v);
		return;
	}
	int mid=(l+r)>>1;
	if(x<=mid) Update(k<<1,l,mid,x,y,v);
	if(y>mid) Update(k<<1|1,mid+1,r,x,y,v);
}

inline ll Query(int k,int l,int r,int x){
	if(l==r) return t[k];
	int mid=(l+r)>>1;
	ll res=t[k];
	if(x<=mid) res=min(res,Query(k<<1,l,mid,x));
	else res=min(res,Query(k<<1|1,mid+1,r,x));
	return res;
}
int main(){
	ios::sync_with_stdio(0);
	cin>>n>>m>>q;
	for(int i=1;i<=m;++i){
		cin>>oe[i].u>>oe[i].v>>oe[i].len;
		add_edge(i,oe[i].u,oe[i].v,oe[i].len);
		add_edge(i,oe[i].v,oe[i].u,oe[i].len);
		ind[i]=-1;
	}

	Dijkstra(n,disT);
	Trace();
	Dijkstra(1,disS,1);
	Dijkstra(n,disT,2);

	Build(1,1,path_cnt);
	for(int i=1;i<=m;++i){
		if(ind[i]==-1){
			Update(1,1,path_cnt,l[oe[i].u]+1,r[oe[i].v],disS[oe[i].u]+oe[i].len+disT[oe[i].v]);
			Update(1,1,path_cnt,l[oe[i].v]+1,r[oe[i].u],disS[oe[i].v]+oe[i].len+disT[oe[i].u]);
		}
	}
	for(int i=1;i<=q;++i){
		int Edge_id;ll New_len,ans=disS[n];
		cin>>Edge_id>>New_len;
		if(ind[Edge_id]!=-1){
			ans=disS[n]-oe[Edge_id].len+New_len;
			if(New_len>oe[Edge_id].len)
				ans=min(ans,Query(1,1,path_cnt,ind[Edge_id]));
		}
		else{
			if(New_len<oe[Edge_id].len){
				ans=min(ans,disS[oe[Edge_id].u]+New_len+disT[oe[Edge_id].v]);
				ans=min(ans,disS[oe[Edge_id].v]+New_len+disT[oe[Edge_id].u]);
			}
		}
		cout<<ans<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN=2e5+5;
const int MAXM=2e5+5;
const ll Inf=1e18;

struct Original_Edge{
	int u,v;ll len;
}oe[MAXM];
struct Node{
	int pos;
	ll dis;
	inline bool operator<(const Node &x)const{
		return x.dis<dis;
	}
};
struct Edge{
	int id,to,nxt;
	ll len;
}e[MAXM<<1];
int cnt,head[MAXN];
inline void add_edge(int id,int u,int v,ll len){
	e[++cnt].id=id;e[cnt].to=v;e[cnt].nxt=head[u];e[cnt].len=len;head[u]=cnt;
}
int n,m,q;
int ind[MAXN];
int lstvis[MAXN];

int path_cnt,l[MAXN],r[MAXN];
bool On_path[MAXN];

ll disS[MAXN],disT[MAXN];
priority_queue<Node> pq;

ll t[MAXM<<4];
inline void Dijkstra(int s,ll dis[],int f=0){
	for(int i=1;i<=n;++i) dis[i]=Inf;
	dis[s]=0;
	pq.push((Node){s,0});
	while(!pq.empty()){
		Node fa=pq.top();pq.pop();

		int x=fa.pos;
		if(fa.dis>dis[x]) continue;
		for(int i=head[x],y;i;i=e[i].nxt){
			y=e[i].to;
			if(dis[y]>fa.dis+e[i].len){
				lstvis[y]=e[i].id;
				dis[y]=fa.dis+e[i].len;
				if(f==1&&!On_path[y]) l[y]=l[x];
				if(f==2&&!On_path[y]) r[y]=r[x];
				pq.push((Node){y,dis[y]});
			}
		}
	}
}

inline void Trace(){
	On_path[1]=true;
	l[1]=r[1]=0;

	int cur=1;
	for(int i=1;cur!=n;++i){
		int Edge_id=lstvis[cur];
		ind[Edge_id]=i;
		++path_cnt;
		cur=oe[Edge_id].u^oe[Edge_id].v^cur;
		On_path[cur]=true;
		l[cur]=r[cur]=i;
	}
}

inline void Build(int k,int l,int r){
	t[k]=Inf;
	if(l==r) return;
	int mid=(l+r)>>1;
	Build(k<<1,l,mid);
	Build(k<<1|1,mid+1,r);
}
inline void Update(int k,int l,int r,int x,int y,ll v){
	if(x>y) return;
	if(x<=l&&r<=y){
		t[k]=min(t[k],v);
		return;
	}
	int mid=(l+r)>>1;
	if(x<=mid) Update(k<<1,l,mid,x,y,v);
	if(y>mid) Update(k<<1|1,mid+1,r,x,y,v);
}

inline ll Query(int k,int l,int r,int x){
	if(l==r) return t[k];
	int mid=(l+r)>>1;
	ll res=t[k];
	if(x<=mid) res=min(res,Query(k<<1,l,mid,x));
	else res=min(res,Query(k<<1|1,mid+1,r,x));
	return res;
}
int main(){
	scanf("%I64d%I64d%I64d",&n,&m,&q);
	for(int i=1;i<=m;++i){
		scanf("%I64d%I64d%I64d",&oe[i].u,&oe[i].v,&oe[i].len);
		add_edge(i,oe[i].u,oe[i].v,oe[i].len);
		add_edge(i,oe[i].v,oe[i].u,oe[i].len);
		ind[i]=-1;
	}

	Dijkstra(n,disT);
	Trace();
	Dijkstra(1,disS,1);
	Dijkstra(n,disT,2);

	Build(1,1,path_cnt);
	for(int i=1;i<=m;++i){
		if(ind[i]==-1){
			Update(1,1,path_cnt,l[oe[i].u]+1,r[oe[i].v],disS[oe[i].u]+oe[i].len+disT[oe[i].v]);
			Update(1,1,path_cnt,l[oe[i].v]+1,r[oe[i].u],disS[oe[i].v]+oe[i].len+disT[oe[i].u]);
		}
	}
	for(int i=1;i<=q;++i){
		int Edge_id;ll New_len,ans=disS[n];
		scanf("%I64d%I64d",&Edge_id,&New_len);
		if(ind[Edge_id]!=-1){
			ans=disS[n]-oe[Edge_id].len+New_len;
			if(New_len>oe[Edge_id].len)
				ans=min(ans,Query(1,1,path_cnt,ind[Edge_id]));
		}
		else{
			if(New_len<oe[Edge_id].len){
				ans=min(ans,disS[oe[Edge_id].u]+New_len+disT[oe[Edge_id].v]);
				ans=min(ans,disS[oe[Edge_id].v]+New_len+disT[oe[Edge_id].u]);
			}
		}
		printf("%I64d\n",ans);
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN=2e5+5;
const int MAXM=2e5+5;
const ll Inf=1e18;

struct Original_Edge{
	int u,v;ll len;
}oe[MAXM];
struct Node{
	int pos;
	ll dis;
	inline bool operator<(const Node &x)const{
		return x.dis<dis;
	}
};
struct Edge{
	int id,to,nxt;
	ll len;
}e[MAXM<<1];
int cnt,head[MAXN];
inline void add_edge(int id,int u,int v,ll len){
	e[++cnt].id=id;e[cnt].to=v;e[cnt].nxt=head[u];e[cnt].len=len;head[u]=cnt;
}
int n,m,q;
int ind[MAXN];
int lstvis[MAXN];

int path_cnt,l[MAXN],r[MAXN];
bool On_path[MAXN];

ll disS[MAXN],disT[MAXN];
priority_queue<Node> pq;

ll t[MAXM<<4];
inline void Dijkstra(int s,ll dis[],int f=0){
	for(int i=1;i<=n;++i) dis[i]=Inf;
	dis[s]=0;
	pq.push((Node){s,0});
	while(!pq.empty()){
		Node fa=pq.top();pq.pop();

		int x=fa.pos;
		if(fa.dis>dis[x]) continue;
		for(int i=head[x],y;i;i=e[i].nxt){
			y=e[i].to;
			if(dis[y]>fa.dis+e[i].len){
				lstvis[y]=e[i].id;
				dis[y]=fa.dis+e[i].len;
				if(f==1&&!On_path[y]) l[y]=l[x];
				if(f==2&&!On_path[y]) r[y]=r[x];
				pq.push((Node){y,dis[y]});
			}
		}
	}
}

inline void Trace(){
	On_path[1]=true;
	l[1]=r[1]=0;

	int cur=1;
	for(int i=1;cur!=n;++i){
		int Edge_id=lstvis[cur];
		ind[Edge_id]=i;
		++path_cnt;
		cur=oe[Edge_id].u^oe[Edge_id].v^cur;
		On_path[cur]=true;
		l[cur]=r[cur]=i;
	}
}

inline void Build(int k,int l,int r){
	t[k]=Inf;
	if(l==r) return;
	int mid=(l+r)>>1;
	Build(k<<1,l,mid);
	Build(k<<1|1,mid+1,r);
}
inline void Update(int k,int l,int r,int x,int y,ll v){
	if(x>y) return;
	if(x<=l&&r<=y){
		t[k]=min(t[k],v);
		return;
	}
	int mid=(l+r)>>1;
	if(x<=mid) Update(k<<1,l,mid,x,y,v);
	if(y>mid) Update(k<<1|1,mid+1,r,x,y,v);
}

inline ll Query(int k,int l,int r,int x){
	if(l==r) return t[k];
	int mid=(l+r)>>1;
	ll res=t[k];
	if(x<=mid) res=min(res,Query(k<<1,l,mid,x));
	else res=min(res,Query(k<<1|1,mid+1,r,x));
	return res;
}
int main(){
	ios::sync_with_stdio(0);
	cin>>n>>m>>q;
	for(int i=1;i<=m;++i){
		cin>>oe[i].u>>oe[i].v>>oe[i].len;
		add_edge(i,oe[i].u,oe[i].v,oe[i].len);
		add_edge(i,oe[i].v,oe[i].u,oe[i].len);
		ind[i]=-1;
	}

	Dijkstra(n,disT);
	Trace();
	Dijkstra(1,disS,1);
	Dijkstra(n,disT,2);

	Build(1,1,path_cnt);
	for(int i=1;i<=m;++i){
		if(ind[i]==-1){
			Update(1,1,path_cnt,l[oe[i].u]+1,r[oe[i].v],disS[oe[i].u]+oe[i].len+disT[oe[i].v]);
			Update(1,1,path_cnt,l[oe[i].v]+1,r[oe[i].u],disS[oe[i].v]+oe[i].len+disT[oe[i].u]);
		}
	}
	for(int i=1;i<=q;++i){
		int Edge_id;ll New_len,ans=disS[n];
		cin>>Edge_id>>New_len;
		if(ind[Edge_id]!=-1){
			ans=disS[n]-oe[Edge_id].len+New_len;
			if(New_len>oe[Edge_id].len)
				ans=min(ans,Query(1,1,path_cnt,ind[Edge_id]));
		}
		else{
			if(New_len<oe[Edge_id].len){
				ans=min(ans,disS[oe[Edge_id].u]+New_len+disT[oe[Edge_id].v]);
				ans=min(ans,disS[oe[Edge_id].v]+New_len+disT[oe[Edge_id].u]);
			}
		}
		cout<<ans<<endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,int> PII;
const int maxn=222222,mod=998244353;
#define MP make_pair
#define PB push_back
#define lson o<<1,l,mid
#define rson o<<1|1,mid+1,r
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define ROF(i,a,b) for(int i=(a);i>=(b);i--)
#define MEM(x,v) memset(x,v,sizeof(x))
inline ll read(){
	char ch=getchar();ll x=0,f=0;
	while(ch<'0' || ch>'9') f|=ch=='-',ch=getchar();
	while(ch>='0' && ch<='9') x=x*10+ch-'0',ch=getchar();
	return f?-x:x;
}
int n,m,q,el=1,head[maxn],to[maxn*2],nxt[maxn*2],w[maxn*2],fa[maxn],tmp[maxn],tmp2[maxn],tl,L[maxn],R[maxn],id[maxn*2];
ll dis[2][maxn],mn[maxn*4];
PII p[maxn];
bool in[maxn];
priority_queue<PII,vector<PII>,greater<PII> > pq;
inline void add(int u,int v,int ww){
	to[++el]=v;nxt[el]=head[u];head[u]=el;w[el]=ww;
}
void dijkstra(ll *dis,int s){
	FOR(i,1,n) dis[i]=1e18;
	pq.push(MP(dis[s]=0,s));
	while(!pq.empty()){
		PII p=pq.top();pq.pop();
		int u=p.second;
		if(p.first>dis[u]) continue;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[v]>dis[u]+w[i]){
				pq.push(MP(dis[v]=dis[u]+w[i],v));
				fa[v]=i;
			}
		}
	}
}
void build(int o,int l,int r){
	mn[o]=1e18;
	if(l==r) return;
	int mid=(l+r)>>1;
	build(lson);build(rson);
}
void update(int o,int l,int r,int ql,int qr,ll v){
	if(ql>qr) return;
//	if(o==1) printf("update %d %d %lld\n",ql,qr,v);
	if(l>=ql && r<=qr) return mn[o]=min(mn[o],v),void();
	int mid=(l+r)>>1;
	if(mid>=ql) update(lson,ql,qr,v);
	if(mid<qr) update(rson,ql,qr,v);
}
ll query(int o,int l,int r,int p){
	if(l==r) return mn[o];
	int mid=(l+r)>>1;
	ll ans=mn[o];
	if(mid>=p) ans=min(ans,query(lson,p));
	else ans=min(ans,query(rson,p));
	return ans;
}
int main(){
	n=read();m=read();q=read();
	FOR(i,1,m){
		int u=read(),v=read(),w=read();
		add(u,v,w);add(v,u,w);
	}
	dijkstra(dis[1],n);
	for(int cur=1;cur!=n;cur=to[fa[cur]^1]) tmp[++tl]=cur,tmp2[tl]=fa[cur]^1,in[cur]=true;
	tmp[++tl]=n;
	in[n]=true;
	FOR(i,1,tl-1) id[tmp2[i]]=id[tmp2[i]^1]=i;
	MEM(L,0x3f);MEM(R,~0x3f);
	FOR(i,1,tl) R[tmp[i]]=i;
	FOR(i,1,n) p[i]=MP(dis[1][i],i);
	sort(p+1,p+n+1);
	FOR(ii,1,n){
		int u=p[ii].second;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[1][v]==dis[1][u]+w[i] && !in[v]) R[v]=max(R[v],R[u]);
		}
	}
	dijkstra(dis[0],1);
	FOR(i,1,tl) L[tmp[i]]=i;
	FOR(i,1,n) p[i]=MP(dis[0][i],i);
	sort(p+1,p+n+1);
	FOR(ii,1,n){
		int u=p[ii].second;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[0][v]==dis[0][u]+w[i] && !in[v]) L[v]=min(L[v],L[u]);
		}
	}
	build(1,1,tl);
	FOR(u,1,n) for(int i=head[u];i;i=nxt[i]){
		int v=to[i];
		if(id[i]) continue;
		update(1,1,tl,L[u],R[v]-1,dis[0][u]+dis[1][v]+w[i]);
		update(1,1,tl,L[v],R[u]-1,dis[0][v]+dis[1][u]+w[i]);
	}
	while(q--){
		int x=read()*2,y=read();
		int u=to[x],v=to[x^1];
		if(id[x]){
			if(y>w[x]) printf("%lld\n",min(dis[0][n]-w[x]+y,query(1,1,tl,id[x])));
			else printf("%lld\n",dis[0][n]-w[x]+y);
		}
		else{
			if(y>w[x]) printf("%lld\n",dis[0][n]);
			else printf("%lld\n",min(dis[0][n],y+min(dis[0][u]+dis[1][v],dis[0][v]+dis[1][u])));
		}
	}
}
// locked up


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,int> PII;
const int maxn=222222,mod=998244353;
#define MP make_pair
#define PB push_back
#define lson o<<1,l,mid
#define rson o<<1|1,mid+1,r
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define ROF(i,a,b) for(int i=(a);i>=(b);i--)
#define MEM(x,v) memset(x,v,sizeof(x))
inline ll read(){
	char ch=getchar();ll x=0,f=0;
	while(ch<'0' || ch>'9') f|=ch=='-',ch=getchar();
	while(ch>='0' && ch<='9') x=x*10+ch-'0',ch=getchar();
	return f?-x:x;
}
int n,m,q,el=1,head[maxn],to[maxn*2],nxt[maxn*2],w[maxn*2],fa[maxn],tmp[maxn],tmp2[maxn],tl,L[maxn],R[maxn],id[maxn*2];
ll dis[2][maxn],mn[maxn*4];
PII p[maxn];
bool in[maxn];
priority_queue<PII,vector<PII>,greater<PII> > pq;
inline void add(int u,int v,int ww){
	to[++el]=v;nxt[el]=head[u];head[u]=el;w[el]=ww;
}
void dijkstra(ll *dis,int s){
	FOR(i,1,n) dis[i]=1e18;
	pq.push(MP(dis[s]=0,s));
	while(!pq.empty()){
		PII p=pq.top();pq.pop();
		int u=p.second;
		if(p.first>dis[u]) continue;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[v]>dis[u]+w[i]){
				pq.push(MP(dis[v]=dis[u]+w[i],v));
				fa[v]=i;
			}
		}
	}
}
void build(int o,int l,int r){
	mn[o]=1e18;
	if(l==r) return;
	int mid=(l+r)>>1;
	build(lson);build(rson);
}
void update(int o,int l,int r,int ql,int qr,ll v){
	if(ql>qr) return;
//	if(o==1) printf("update %d %d %lld\n",ql,qr,v);
	if(l>=ql && r<=qr) return mn[o]=min(mn[o],v),void();
	int mid=(l+r)>>1;
	if(mid>=ql) update(lson,ql,qr,v);
	if(mid<qr) update(rson,ql,qr,v);
}
ll query(int o,int l,int r,int p){
	if(l==r) return mn[o];
	int mid=(l+r)>>1;
	ll ans=mn[o];
	if(mid>=p) ans=min(ans,query(lson,p));
	else ans=min(ans,query(rson,p));
	return ans;
}
int main(){
	n=read();m=read();q=read();
	FOR(i,1,m){
		int u=read(),v=read(),w=read();
		add(u,v,w);add(v,u,w);
	}
	dijkstra(dis[1],n);
	for(int cur=1;cur!=n;cur=to[fa[cur]^1]) tmp[++tl]=cur,tmp2[tl]=fa[cur]^1,in[cur]=true;
	tmp[++tl]=n;
	in[n]=true;
	FOR(i,1,tl-1) id[tmp2[i]]=id[tmp2[i]^1]=i;
	MEM(L,0x3f);MEM(R,~0x3f);
	FOR(i,1,tl) R[tmp[i]]=i;
	FOR(i,1,n) p[i]=MP(dis[1][i],i);
	sort(p+1,p+n+1);
	FOR(ii,1,n){
		int u=p[ii].second;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[1][v]==dis[1][u]+w[i] && !in[v]) R[v]=max(R[v],R[u]);
		}
	}
	dijkstra(dis[0],1);
	FOR(i,1,tl) L[tmp[i]]=i;
	FOR(i,1,n) p[i]=MP(dis[0][i],i);
	sort(p+1,p+n+1);
	FOR(ii,1,n){
		int u=p[ii].second;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[0][v]==dis[0][u]+w[i] && !in[v]) L[v]=min(L[v],L[u]);
		}
	}
	build(1,1,tl);
	FOR(u,1,n) for(int i=head[u];i;i=nxt[i]){
		int v=to[i];
		if(id[i]) continue;
		update(1,1,tl,L[u],R[v]-1,dis[0][u]+dis[1][v]+w[i]);
		update(1,1,tl,L[v],R[u]-1,dis[0][v]+dis[1][u]+w[i]);
	}
	while(q--){
		int x=read()*2,y=read();
		int u=to[x],v=to[x^1];
		if(id[x]){
			if(y>w[x]) printf("%lld\n",min(dis[0][n]-w[x]+y,query(1,1,tl,id[x])));
			else printf("%lld\n",dis[0][n]-w[x]+y);
		}
		else{
			if(y>w[x]) printf("%lld\n",dis[0][n]);
			else printf("%lld\n",min(dis[0][n],y+min(dis[0][u]+dis[1][v],dis[0][v]+dis[1][u])));
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,int> PII;
const int maxn=222222,mod=998244353;
#define MP make_pair
#define PB push_back
#define lson o<<1,l,mid
#define rson o<<1|1,mid+1,r
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define ROF(i,a,b) for(int i=(a);i>=(b);i--)
#define MEM(x,v) memset(x,v,sizeof(x))
inline ll read(){
	char ch=getchar();ll x=0,f=0;
	while(ch<'0' || ch>'9') f|=ch=='-',ch=getchar();
	while(ch>='0' && ch<='9') x=x*10+ch-'0',ch=getchar();
	return f?-x:x;
}
int n,m,q,el=1,head[maxn],to[maxn*2],nxt[maxn*2],w[maxn*2],fa[maxn],tmp[maxn],tmp2[maxn],tl,L[maxn],R[maxn],id[maxn];
ll dis[2][maxn],mn[maxn*4];
PII p[maxn];
bool in[maxn];
priority_queue<PII,vector<PII>,greater<PII> > pq;
inline void add(int u,int v,int ww){
	to[++el]=v;nxt[el]=head[u];head[u]=el;w[el]=ww;
}
void dijkstra(ll *dis,int s){
	FOR(i,1,n) dis[i]=1e18;
	pq.push(MP(dis[s]=0,s));
	while(!pq.empty()){
		PII p=pq.top();pq.pop();
		int u=p.second;
		if(p.first>dis[u]) continue;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[v]>dis[u]+w[i]){
				pq.push(MP(dis[v]=dis[u]+w[i],v));
				fa[v]=i;
			}
		}
	}
}
void build(int o,int l,int r){
	mn[o]=1e18;
	if(l==r) return;
	int mid=(l+r)>>1;
	build(lson);build(rson);
}
void update(int o,int l,int r,int ql,int qr,ll v){
	if(ql>qr) return;
//	if(o==1) printf("update %d %d %lld\n",ql,qr,v);
	if(l>=ql && r<=qr) return mn[o]=min(mn[o],v),void();
	int mid=(l+r)>>1;
	if(mid>=ql) update(lson,ql,qr,v);
	if(mid<qr) update(rson,ql,qr,v);
}
ll query(int o,int l,int r,int p){
	if(l==r) return mn[o];
	int mid=(l+r)>>1;
	ll ans=mn[o];
	if(mid>=p) ans=min(ans,query(lson,p));
	else ans=min(ans,query(rson,p));
	return ans;
}
int main(){
	n=read();m=read();q=read();
	FOR(i,1,m){
		int u=read(),v=read(),w=read();
		add(u,v,w);add(v,u,w);
	}
	dijkstra(dis[1],n);
	for(int cur=1;cur!=n;cur=to[fa[cur]^1]) tmp[++tl]=cur,tmp2[tl]=fa[cur]^1,in[cur]=true;
	tmp[++tl]=n;
	in[n]=true;
	FOR(i,1,tl-1) id[tmp2[i]]=id[tmp2[i]^1]=i;
	MEM(L,0x3f);MEM(R,~0x3f);
	FOR(i,1,tl) R[tmp[i]]=i;
	FOR(i,1,n) p[i]=MP(dis[1][i],i);
	sort(p+1,p+n+1);
	FOR(ii,1,n){
		int u=p[ii].second;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[1][v]==dis[1][u]+w[i] && !in[v]) R[v]=max(R[v],R[u]);
		}
	}
	dijkstra(dis[0],1);
	FOR(i,1,tl) L[tmp[i]]=i;
	FOR(i,1,n) p[i]=MP(dis[0][i],i);
	sort(p+1,p+n+1);
	FOR(ii,1,n){
		int u=p[ii].second;
		for(int i=head[u];i;i=nxt[i]){
			int v=to[i];
			if(dis[0][v]==dis[0][u]+w[i] && !in[v]) L[v]=min(L[v],L[u]);
		}
	}
	build(1,1,tl);
	FOR(u,1,n) for(int i=head[u];i;i=nxt[i]){
		int v=to[i];
		if(id[i]) continue;
		update(1,1,tl,L[u],R[v]-1,dis[0][u]+dis[1][v]+w[i]);
		update(1,1,tl,L[v],R[u]-1,dis[0][v]+dis[1][u]+w[i]);
	}
	while(q--){
		int x=read()*2,y=read();
		int u=to[x],v=to[x^1];
		if(id[x]){
			if(y>w[x]) printf("%lld\n",min(dis[0][n]-w[x]+y,query(1,1,tl,id[x])));
			else printf("%lld\n",dis[0][n]-w[x]+y);
		}
		else{
			if(y>w[x]) printf("%lld\n",dis[0][n]);
			else printf("%lld\n",min(dis[0][n],y+min(dis[0][u]+dis[1][v],dis[0][v]+dis[1][u])));
		}
	}
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef pair<int, int> PII;

vector<int> dijkstra(const vector<vector<PII> >& g, int src) {
  int n = int(g.size());
  vector<int> dist(n, -1);
  priority_queue<PII, vector<PII>, greater<PII> > pq;
  dist[src] = 0;
  pq.push(PII(0, src));
  for (; !pq.empty();) {
    PII cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      int d = dist[u] + g[u][i].se;
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pq.push(PII(d, v));
      }
    }
  }
  return dist;
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PII> > g(n);
  vector<pair<PII, int> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PII(v, w));
    g[v].push_back(PII(u, w));
    es.push_back(make_pair(PII(u, v), w));
  }
  vector<int> d0 = dijkstra(g, 0);
  for (int i = 0; i < int(es.size()); ++i) {
    if (es[i].fi.fi > es[i].fi.se) {
      swap(es[i].fi.fi, es[i].fi.se);
    }
  }
  vector<int> dg = dijkstra(g, n - 1);
  vector<pair<PII, PII> > queries;
  vector<int> ans(q, -1);
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    if (d0[u] == -1 || dg[u] == -1 || d0[u] == d0[v] || dg[u] < dg[v]) {
      ans[i] = d0[n - 1];
    } else {
      queries.push_back(make_pair(PII(d0[u], i), PII(t, x)));
    }
  }
  sort(queries.begin(), queries.end());
  vector<PII> enter;
  vector<PII> leave;
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    if (d0[u] == -1 || dg[u] == -1) continue;
    int v = es[i].fi.se;
    if (d0[u] == d0[v] || dg[u] < dg[v]) continue;
    enter.push_back(PII(d0[u], i));
    leave.push_back(PII(d0[v], i));
  }
  sort(enter.begin(), enter.end());
  sort(leave.begin(), leave.end());
  set<PII> cand;
  for (int iq = 0, ie = 0, il = 0; iq < int(queries.size()); ++iq) {
    int t = queries[iq].se.fi;
    int u = es[t].fi.fi;
    for (; ie < int(enter.size()) && enter[ie].fi <= d0[u]; ++ie) {
      int te = enter[ie].se;
      int ue = es[te].fi.fi;
      int ve = es[te].fi.se;
      int we = es[te].se;
      cand.insert(PII(d0[ue] + we + dg[ve], te));
    }
    for (; il < int(leave.size()) && leave[il].fi <= d0[u]; ++il) {
      int tl = leave[il].se;
      int ul = es[tl].fi.fi;
      int vl = es[tl].fi.se;
      int wl = es[tl].se;
      int dl = d0[ul] + wl + dg[vl];
      set<PII>::iterator it = cand.find(PII(dl, tl));
      assert(it != cand.end());
      cand.erase(it);
    }
    int v = es[t].fi.se;
    int w = es[t].se;
    int d = d0[u] + w + dg[v];
    set<PII>::iterator it = cand.find(PII(d, t));
    assert(it != cand.end());
    cand.erase(it);
    int x = queries[iq].se.se;
    int xd = d0[u] + x + dg[v];
    ans[queries[iq].fi.se] = (cand.empty() ? xd : min(xd, cand.begin()->first));
    cand.insert(PII(d, t));
  }
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << endl;
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, int> PLI;

vector<ll> dijkstra(const vector<vector<PII> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + ll(g[u][i].se);
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pq.push(PII(d, v));
      }
    }
  }
  return dist;
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PII> > g(n);
  vector<pair<PII, int> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PII(v, w));
    g[v].push_back(PII(u, w));
    es.push_back(make_pair(PII(u, v), w));
  }
  vector<ll> d0 = dijkstra(g, 0);
  for (int i = 0; i < int(es.size()); ++i) {
    if (d0[es[i].fi.fi] > d0[es[i].fi.se]) {
      swap(es[i].fi.fi, es[i].fi.se);
    }
  }
  vector<ll> dg = dijkstra(g, n - 1);
  vector<pair<PLI, PII> > queries;
  vector<ll> ans(q, -1);
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    if (d0[u] == -1 || dg[u] == -1 || d0[u] == d0[v] || dg[u] < dg[v]) {
      ans[i] = d0[n - 1];
    } else {
      queries.push_back(make_pair(PLI(d0[u], i), PII(t, x)));
    }
  }
  sort(queries.begin(), queries.end());
  vector<PLI> enter;
  vector<PLI> leave;
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    if (d0[u] == -1 || dg[u] == -1) continue;
    int v = es[i].fi.se;
    assert(d0[u] <= d0[v]);
    if (d0[u] == d0[v] || dg[u] < dg[v]) continue;
    enter.push_back(PII(d0[u], i));
    leave.push_back(PII(d0[v], i));
  }
  sort(enter.begin(), enter.end());
  sort(leave.begin(), leave.end());
  set<PLI> cand;
  for (int iq = 0, ie = 0, il = 0; iq < int(queries.size()); ++iq) {
    int t = queries[iq].se.fi;
    int u = es[t].fi.fi;
    for (; ie < int(enter.size()) && enter[ie].fi <= d0[u]; ++ie) {
      int te = enter[ie].se;
      int ue = es[te].fi.fi;
      int ve = es[te].fi.se;
      int we = es[te].se;
      cand.insert(PLI(d0[ue] + ll(we) + dg[ve], te));
    }
    for (; il < int(leave.size()) && leave[il].fi <= d0[u]; ++il) {
      int tl = leave[il].se;
      int ul = es[tl].fi.fi;
      int vl = es[tl].fi.se;
      int wl = es[tl].se;
      ll dl = d0[ul] + ll(wl) + dg[vl];
      set<PLI>::iterator it = cand.find(PLI(dl, tl));
      assert(it != cand.end());
      cand.erase(it);
    }
    int v = es[t].fi.se;
    int w = es[t].se;
    ll d = d0[u] + ll(w) + dg[v];
    set<PLI>::iterator it = cand.find(PLI(d, t));
    assert(it != cand.end());
    cand.erase(it);
    int x = queries[iq].se.se;
    ll xd = d0[u] + ll(x) + dg[v];
    ans[queries[iq].fi.se] = (cand.empty() ? xd : min(xd, cand.begin()->first));
    cand.insert(PLI(d, t));
  }
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << endl;
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, int> PLI;

vector<ll> dijkstra(const vector<vector<PII> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + ll(g[u][i].se);
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pq.push(PLI(d, v));
      }
    }
  }
  return dist;
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PII> > g(n);
  vector<pair<PII, int> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PII(v, w));
    g[v].push_back(PII(u, w));
    es.push_back(make_pair(PII(u, v), w));
  }
  vector<ll> d0 = dijkstra(g, 0);
  for (int i = 0; i < int(es.size()); ++i) {
    if (d0[es[i].fi.fi] > d0[es[i].fi.se]) {
      swap(es[i].fi.fi, es[i].fi.se);
    }
  }
  vector<ll> dg = dijkstra(g, n - 1);
  vector<pair<PLI, PII> > queries;
  vector<ll> ans(q, -1);
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    assert(d0[u] <= d0[v]);
    if (d0[u] == -1 || dg[u] == -1 || d0[u] == d0[v] || dg[u] <= dg[v]) {
      ans[i] = d0[n - 1];
    } else {
      queries.push_back(make_pair(PLI(d0[u], i), PII(t, x)));
    }
  }
  sort(queries.begin(), queries.end());
  vector<PLI> enter;
  vector<PLI> leave;
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    if (d0[u] == -1 || dg[u] == -1) continue;
    int v = es[i].fi.se;
    int w = es[i].se;
    enter.push_back(PLI(d0[u], 2 * i));
    leave.push_back(PLI(d0[u] + ll(w), 2 * i));
    enter.push_back(PLI(d0[v], 2 * i + 1));
    leave.push_back(PLI(d0[v] + ll(w), 2 * i + 1));
  }
  sort(enter.begin(), enter.end());
  sort(leave.begin(), leave.end());
  set<PLI> cand;
  for (int iq = 0, ie = 0, il = 0; iq < int(queries.size()); ++iq) {
    int t = queries[iq].se.fi;
    int u = es[t].fi.fi;
    for (; ie < int(enter.size()) && enter[ie].fi <= d0[u]; ++ie) {
      int te = enter[ie].se;
      int ue = es[te / 2].fi.fi;
      int ve = es[te / 2].fi.se;
      if (te % 2 != 0) swap(ue, ve);
      int we = es[te / 2].se;
      cand.insert(PLI(d0[ue] + ll(we) + dg[ve], te));
    }
    for (; il < int(leave.size()) && leave[il].fi <= d0[u]; ++il) {
      int tl = leave[il].se;
      int ul = es[tl / 2].fi.fi;
      int vl = es[tl / 2].fi.se;
      if (tl % 2 != 0) swap(ul, vl);
      int wl = es[tl / 2].se;
      ll dl = d0[ul] + ll(wl) + dg[vl];
      set<PLI>::iterator it = cand.find(PLI(dl, tl));
      assert(it != cand.end());
      cand.erase(it);
    }
    int v = es[t].fi.se;
    assert(d0[u] < d0[v]);
    int w = es[t].se;
    ll d = d0[u] + ll(w) + dg[v];
    set<PLI>::iterator it = cand.find(PLI(d, 2 * t));
    assert(it != cand.end());
    cand.erase(it);
    int x = queries[iq].se.se;
    ll xd = d0[u] + ll(x) + dg[v];
    ans[queries[iq].fi.se] = (cand.empty() ? xd : min(xd, cand.begin()->first));
    cand.insert(PLI(d, 2 * t));
  }
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << endl;
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<int, ll> PIL;
typedef pair<ll, int> PLI;

pair<vector<ll>, vector<int> > dijkstra(const vector<vector<PIL> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  vector<int> pre(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pre[0] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + ll(g[u][i].se);
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pre[v] = u;
        pq.push(PLI(d, v));
      }
    }
  }
  return make_pair(dist, pre);
}

void flood_rely(const vector<vector<PIL> >& g, const vector<ll>& dist, vector<int>& rely, int u) {
  assert(dist[u] >= 0);
  assert(rely[u] >= 0);
  for (int i = 0; i < int(g[u].size()); ++i) {
    int v = g[u][i].fi;
    if (rely[v] == -1 && dist[v] == dist[u] + g[u][i].se) {
      rely[v] = 1;
      flood_rely(g, dist, rely, v);
    }
  }
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PIL> > g(n);
  vector<pair<PII, ll> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PIL(v, ll(w)));
    g[v].push_back(PIL(u, ll(w)));
    es.push_back(make_pair(PII(u, v), ll(w)));
  }
  pair<vector<ll>, vector<int> > dijkstra0 = dijkstra(g, 0);
  vector<ll> d0 = dijkstra0.fi;
  vector<int> pre0 = dijkstra0.se;
  assert(pre0[n - 1] >= 0);
  vector<int> path;
  for (int u = n - 1; u != 0; u = pre0[u]) {
    path.push_back(u);
  }
  path.push_back(0);
  reverse(path.begin(), path.end());
  vector<int> l(n, -1);
  vector<int> r(n, -1);
  for (int i = 0; i < int(path.size()); ++i) {
    l[path[i]] = i;
    r[path[i]] = i;
  }
  for (int i = 0; i < int(path.size()); ++i) {
    flood_rely(g, d0, l, path[i]);
  }
  vector<ll> dg = dijkstra(g, n - 1).fi;
  for (int i = int(path.size()) - 1; i >= 0; --i) {
    flood_rely(g, dg, r, path[i]);
  }
  vector<int> path_ind(n, -1);
  for (int i = 0; i < int(path.size()); ++i) {
    path_ind[path[i]] = i;
  }
  vector<int> epath(int(path.size()) - 1, -1);
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    int v = es[i].fi.se;
    if (path_ind[u] >= 0 && path_ind[v] >= 0 && abs(path_ind[u] - path_ind[v]) == 1) {
      if (path_ind[u] > path_ind[v]) swap(u, v);
      if (epath[path_ind[u]] < 0 && d0[v] == d0[u] + es[i].se) {
        epath[path_ind[u]] = i;
      }
    }
  }
  vector<int> epath_ind(m, -1);
  for (int i = 0; i < int(epath.size()); ++i) {
    epath_ind[epath[i]] = i;
  }
  vector<vector<PLI> > begin(path.size());
  vector<vector<PLI> > end(path.size());
  for (int i = 0; i < m; ++i) {
    if (epath_ind[i] >= 0) continue;
    int u = es[i].fi.fi;
    int v = es[i].fi.se;
    for (int j = 0; j < 2; ++j) {
      if (l[u] < r[v]) {
        ll dist = d0[u] + es[i].se + dg[v];
        begin[l[u]].push_back(PLI(dist, i));
        end[r[v]].push_back(PLI(dist, i));
      }
      swap(u, v);
    }
  }
  vector<ll> mn_without(path.size(), -1);
  set<PLI> open;
  for (int i = 0; i < int(path.size()); ++i) {
    for (int j = 0; j < int(begin[i].size()); ++j) {
      open.insert(begin[i][j]);
    }
    for (int j = 0; j < int(end[i].size()); ++j) {
      set<PLI>::iterator it = open.find(end[i][j]);
      assert(it != open.end());
      open.erase(it);
    }
    mn_without[i] = (open.empty() ? -1 : open.begin()->first);
  }
  for (; q > 0; --q) {
    int t;
    ll x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    ll use = (d0[u] < 0 ? -1 : min(d0[u] + x + dg[v], d0[v] + x + dg[u]));
    if (epath_ind[t] < 0) {
      cout << (use < 0 ? d0[n - 1] : min(use, d0[n - 1])) << endl;
    } else {
      assert(use >= 0);
      if (mn_without[epath_ind[t]] < 0) {
        cout << use << endl;
      } else {
        cout << min(use, mn_without[epath_ind[t]]) << endl;
      }
    }
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, int> PLI;

vector<ll> dijkstra(const vector<vector<PII> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + ll(g[u][i].se);
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pq.push(PLI(d, v));
      }
    }
  }
  return dist;
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PII> > g(n);
  vector<pair<PII, int> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PII(v, w));
    g[v].push_back(PII(u, w));
    es.push_back(make_pair(PII(u, v), w));
  }
  vector<ll> d0 = dijkstra(g, 0);
  for (int i = 0; i < int(es.size()); ++i) {
    if (d0[es[i].fi.fi] > d0[es[i].fi.se]) {
      swap(es[i].fi.fi, es[i].fi.se);
    }
  }
  vector<ll> dg = dijkstra(g, n - 1);
  vector<pair<PLI, PII> > queries;
  vector<ll> ans(q, -1);
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    assert(d0[u] <= d0[v]);
    if (d0[u] == -1 || dg[u] == -1 || d0[u] == d0[v] || dg[u] < dg[v]) {
      ans[i] = d0[n - 1];
    } else {
      queries.push_back(make_pair(PLI(d0[u], i), PII(t, x)));
    }
  }
  sort(queries.begin(), queries.end());
  vector<PLI> enter;
  vector<PLI> leave;
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    if (d0[u] == -1 || dg[u] == -1) continue;
    int v = es[i].fi.se;
    int w = es[i].se;
    enter.push_back(PLI(d0[u], 2 * i));
    leave.push_back(PLI(d0[u] + ll(w), 2 * i));
    enter.push_back(PLI(d0[v], 2 * i + 1));
    leave.push_back(PLI(d0[v] + ll(w), 2 * i + 1));
  }
  sort(enter.begin(), enter.end());
  sort(leave.begin(), leave.end());
  set<PLI> cand;
  for (int iq = 0, ie = 0, il = 0; iq < int(queries.size()); ++iq) {
    int t = queries[iq].se.fi;
    int u = es[t].fi.fi;
    for (; ie < int(enter.size()) && enter[ie].fi <= d0[u]; ++ie) {
      int te = enter[ie].se;
      int ue = es[te / 2].fi.fi;
      int ve = es[te / 2].fi.se;
      int we = es[te / 2].se;
      cand.insert(PLI(d0[ue] + ll(we) + dg[ve], te));
    }
    for (; il < int(leave.size()) && leave[il].fi <= d0[u]; ++il) {
      int tl = leave[il].se;
      int ul = es[tl / 2].fi.fi;
      int vl = es[tl / 2].fi.se;
      int wl = es[tl / 2].se;
      ll dl = d0[ul] + ll(wl) + dg[vl];
      set<PLI>::iterator it = cand.find(PLI(dl, tl));
      assert(it != cand.end());
      cand.erase(it);
    }
    int v = es[t].fi.se;
    int w = es[t].se;
    ll d_uv = d0[u] + ll(w) + dg[v];
    set<PLI>::iterator it_uv = cand.find(PLI(d_uv, 2 * t));
    assert(it_uv != cand.end());
    cand.erase(it_uv);
    ll d_vu = d0[v] + ll(w) + dg[u];
    set<PLI>::iterator it_vu = cand.find(PLI(d_vu, 2 * t + 1));
    bool vu_found = false;
    if (it_vu != cand.end()) {
      vu_found = true;
      cand.erase(it_vu);
    }
    int x = queries[iq].se.se;
    ll xd = d0[u] + ll(x) + dg[v];
    ans[queries[iq].fi.se] = (cand.empty() ? xd : min(xd, cand.begin()->first));
    cand.insert(PLI(d_uv, 2 * t));
    if (vu_found) {
      cand.insert(PLI(d_vu, 2 * t + 1));
    }
  }
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << endl;
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<int, ll> PIL;
typedef pair<ll, int> PLI;

pair<vector<ll>, vector<int> > dijkstra(const vector<vector<PIL> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  vector<int> pre(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pre[0] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + ll(g[u][i].se);
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pre[v] = u;
        pq.push(PLI(d, v));
      }
    }
  }
  return make_pair(dist, pre);
}

void flood_rely(const vector<vector<PIL> >& g, const vector<ll>& dist, vector<int>& rely, int u) {
  assert(dist[u] >= 0);
  assert(rely[u] >= 0);
  for (int i = 0; i < int(g[u].size()); ++i) {
    int v = g[u][i].fi;
    if (rely[v] == -1 && dist[v] == dist[u] + g[u][i].se) {
      rely[v] = rely[u];
      flood_rely(g, dist, rely, v);
    }
  }
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PIL> > g(n);
  vector<pair<PII, ll> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PIL(v, ll(w)));
    g[v].push_back(PIL(u, ll(w)));
    es.push_back(make_pair(PII(u, v), ll(w)));
  }
  pair<vector<ll>, vector<int> > dijkstra0 = dijkstra(g, 0);
  vector<ll> d0 = dijkstra0.fi;
  vector<int> pre0 = dijkstra0.se;
  assert(pre0[n - 1] >= 0);
  vector<int> path;
  for (int u = n - 1; u != 0; u = pre0[u]) {
    path.push_back(u);
  }
  path.push_back(0);
  reverse(path.begin(), path.end());
  vector<int> l(n, -1);
  vector<int> r(n, -1);
  for (int i = 0; i < int(path.size()); ++i) {
    l[path[i]] = i;
    r[path[i]] = i;
  }
  for (int i = 0; i < int(path.size()); ++i) {
    flood_rely(g, d0, l, path[i]);
  }
  vector<ll> dg = dijkstra(g, n - 1).fi;
  for (int i = int(path.size()) - 1; i >= 0; --i) {
    flood_rely(g, dg, r, path[i]);
  }
  vector<int> path_ind(n, -1);
  for (int i = 0; i < int(path.size()); ++i) {
    path_ind[path[i]] = i;
  }
  vector<int> epath(int(path.size()) - 1, -1);
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    int v = es[i].fi.se;
    if (path_ind[u] >= 0 && path_ind[v] >= 0 && abs(path_ind[u] - path_ind[v]) == 1) {
      if (path_ind[u] > path_ind[v]) swap(u, v);
      if (epath[path_ind[u]] < 0 && d0[v] == d0[u] + es[i].se) {
        epath[path_ind[u]] = i;
      }
    }
  }
  vector<int> epath_ind(m, -1);
  for (int i = 0; i < int(epath.size()); ++i) {
    epath_ind[epath[i]] = i;
  }
  vector<vector<PLI> > begin(path.size());
  vector<vector<PLI> > end(path.size());
  for (int i = 0; i < m; ++i) {
    if (epath_ind[i] >= 0) continue;
    int u = es[i].fi.fi;
    int v = es[i].fi.se;
    for (int j = 0; j < 2; ++j) {
      if (l[u] < r[v]) {
        ll dist = d0[u] + es[i].se + dg[v];
        begin[l[u]].push_back(PLI(dist, 2 * i + j));
        end[r[v]].push_back(PLI(dist, 2 * i + j));
      }
      swap(u, v);
    }
  }
  vector<ll> mn_without(path.size(), -1);
  set<PLI> open;
  for (int i = 0; i < int(path.size()); ++i) {
    for (int j = 0; j < int(begin[i].size()); ++j) {
      open.insert(begin[i][j]);
    }
    for (int j = 0; j < int(end[i].size()); ++j) {
      set<PLI>::iterator it = open.find(end[i][j]);
      assert(it != open.end());
      open.erase(it);
    }
    mn_without[i] = (open.empty() ? -1 : open.begin()->first);
  }
  for (; q > 0; --q) {
    int t;
    ll x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    ll use = (d0[u] < 0 ? -1 : min(d0[u] + x + dg[v], d0[v] + x + dg[u]));
    if (epath_ind[t] < 0) {
      cout << (use < 0 ? d0[n - 1] : min(use, d0[n - 1])) << endl;
    } else {
      assert(use >= 0);
      if (mn_without[epath_ind[t]] < 0) {
        cout << use << endl;
      } else {
        cout << min(use, mn_without[epath_ind[t]]) << endl;
      }
    }
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<int, ll> PIL;
typedef pair<ll, int> PLI;

pair<vector<ll>, vector<int> > dijkstra(const vector<vector<PIL> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  vector<int> pre(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pre[0] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + ll(g[u][i].se);
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pre[v] = u;
        pq.push(PLI(d, v));
      }
    }
  }
  return make_pair(dist, pre);
}

void flood_rely(const vector<vector<PIL> >& g, const vector<ll>& dist, vector<int>& rely, int u) {
  assert(dist[u] >= 0);
  assert(rely[u] >= 0);
  for (int i = 0; i < int(g[u].size()); ++i) {
    int v = g[u][i].fi;
    if (rely[v] == -1 && dist[v] == dist[u] + g[u][i].se) {
      rely[v] = rely[u];
      flood_rely(g, dist, rely, v);
    }
  }
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PIL> > g(n);
  vector<pair<PII, ll> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PIL(v, ll(w)));
    g[v].push_back(PIL(u, ll(w)));
    es.push_back(make_pair(PII(u, v), ll(w)));
  }
  pair<vector<ll>, vector<int> > dijkstra0 = dijkstra(g, 0);
  vector<ll> d0 = dijkstra0.fi;
  vector<int> pre0 = dijkstra0.se;
  assert(pre0[n - 1] >= 0);
  vector<int> path;
  for (int u = n - 1; u != 0; u = pre0[u]) {
    path.push_back(u);
  }
  path.push_back(0);
  reverse(path.begin(), path.end());
  vector<int> l(n, -1);
  vector<int> r(n, -1);
  for (int i = 0; i < int(path.size()); ++i) {
    l[path[i]] = i;
    r[path[i]] = i;
  }
  for (int i = 0; i < int(path.size()); ++i) {
    flood_rely(g, d0, l, path[i]);
  }
  vector<ll> dg = dijkstra(g, n - 1).fi;
  for (int i = int(path.size()) - 1; i >= 0; --i) {
    flood_rely(g, dg, r, path[i]);
  }
  vector<int> path_ind(n, -1);
  for (int i = 0; i < int(path.size()); ++i) {
    path_ind[path[i]] = i;
  }
  vector<int> epath(int(path.size()) - 1, -1);
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    int v = es[i].fi.se;
    if (path_ind[u] >= 0 && path_ind[v] >= 0 && abs(path_ind[u] - path_ind[v]) == 1) {
      if (path_ind[u] > path_ind[v]) swap(u, v);
      if (epath[path_ind[u]] < 0 && d0[v] == d0[u] + es[i].se) {
        epath[path_ind[u]] = i;
      }
    }
  }
  vector<int> epath_ind(m, -1);
  for (int i = 0; i < int(epath.size()); ++i) {
    epath_ind[epath[i]] = i;
  }
  vector<vector<PLI> > begin(path.size());
  vector<vector<PLI> > end(path.size());
  for (int i = 0; i < m; ++i) {
    if (epath_ind[i] >= 0) continue;
    int u = es[i].fi.fi;
    int v = es[i].fi.se;
    for (int j = 0; j < 2; ++j) {
      if (l[u] < r[v]) {
        ll dist = d0[u] + es[i].se + dg[v];
        begin[l[u]].push_back(PLI(dist, i));
        end[r[v]].push_back(PLI(dist, i));
      }
      swap(u, v);
    }
  }
  vector<ll> mn_without(path.size(), -1);
  set<PLI> open;
  for (int i = 0; i < int(path.size()); ++i) {
    for (int j = 0; j < int(begin[i].size()); ++j) {
      open.insert(begin[i][j]);
    }
    for (int j = 0; j < int(end[i].size()); ++j) {
      set<PLI>::iterator it = open.find(end[i][j]);
      assert(it != open.end());
      open.erase(it);
    }
    mn_without[i] = (open.empty() ? -1 : open.begin()->first);
  }
  for (; q > 0; --q) {
    int t;
    ll x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    ll use = (d0[u] < 0 ? -1 : min(d0[u] + x + dg[v], d0[v] + x + dg[u]));
    if (epath_ind[t] < 0) {
      cout << (use < 0 ? d0[n - 1] : min(use, d0[n - 1])) << endl;
    } else {
      assert(use >= 0);
      if (mn_without[epath_ind[t]] < 0) {
        cout << use << endl;
      } else {
        cout << min(use, mn_without[epath_ind[t]]) << endl;
      }
    }
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<int, ll> PIL;
typedef pair<ll, int> PLI;

pair<vector<ll>, vector<int> > dijkstra(const vector<vector<PIL> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  vector<int> pre(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pre[0] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + ll(g[u][i].se);
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pre[v] = u;
        pq.push(PLI(d, v));
      }
    }
  }
  return make_pair(dist, pre);
}

void flood_rely(const vector<vector<PIL> >& g, const vector<ll>& dist, vector<int>& rely, int u) {
  assert(dist[u] >= 0);
  assert(rely[u] >= 0);
  for (int i = 0; i < int(g[u].size()); ++i) {
    int v = g[u][i].fi;
    if (rely[v] == -1 && dist[v] == dist[u] + g[u][i].se) {
      rely[v] = 1;
      flood_rely(g, dist, rely, v);
    }
  }
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PIL> > g(n);
  vector<pair<PII, ll> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PIL(v, ll(w)));
    g[v].push_back(PIL(u, ll(w)));
    es.push_back(make_pair(PII(u, v), ll(w)));
  }
  pair<vector<ll>, vector<int> > dijkstra0 = dijkstra(g, 0);
  vector<ll> d0 = dijkstra0.fi;
  vector<int> pre0 = dijkstra0.se;
  assert(pre0[n - 1] >= 0);
  vector<int> path;
  for (int u = n - 1; u != 0; u = pre0[u]) {
    path.push_back(u);
  }
  path.push_back(0);
  reverse(path.begin(), path.end());
  vector<int> l(n, -1);
  vector<int> r(n, -1);
  for (int i = 0; i < int(path.size()); ++i) {
    l[path[i]] = i;
    r[path[i]] = i;
  }
  for (int i = 0; i < int(path.size()); ++i) {
    flood_rely(g, d0, l, path[i]);
  }
  vector<ll> dg = dijkstra(g, n - 1).fi;
  for (int i = int(path.size()) - 1; i >= 0; --i) {
    flood_rely(g, dg, r, path[i]);
  }
  vector<int> path_ind(n, -1);
  for (int i = 0; i < int(path.size()); ++i) {
    path_ind[path[i]] = i;
  }
  vector<int> epath(int(path.size()) - 1, -1);
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    int v = es[i].fi.se;
    if (path_ind[u] >= 0 && path_ind[v] >= 0 && abs(path_ind[u] - path_ind[v]) == 1) {
      if (path_ind[u] > path_ind[v]) swap(u, v);
      if (epath[path_ind[u]] < 0 && d0[v] == d0[u] + es[i].se) {
        epath[path_ind[u]] = i;
      }
    }
  }
  vector<int> epath_ind(m, -1);
  for (int i = 0; i < int(epath.size()); ++i) {
    epath_ind[epath[i]] = i;
  }
  vector<vector<PLI> > begin(path.size());
  vector<vector<PLI> > end(path.size());
  for (int i = 0; i < m; ++i) {
    if (epath_ind[i] >= 0) continue;
    int u = es[i].fi.fi;
    int v = es[i].fi.se;
    for (int j = 0; j < 2; ++j) {
      if (l[u] < r[v]) {
        ll dist = d0[u] + es[i].se + dg[v];
        begin[l[u]].push_back(PLI(dist, i));
        end[r[v]].push_back(PLI(dist, i));
      }
      swap(u, v);
    }
  }
  vector<ll> mn_without(path.size(), -1);
  set<PLI> open;
  for (int i = 0; i < int(path.size()); ++i) {
    for (int j = 0; j < int(begin[i].size()); ++j) {
      open.insert(begin[i][j]);
    }
    for (int j = 0; j < int(end[i].size()); ++j) {
      set<PLI>::iterator it = open.find(end[i][j]);
      assert(it != open.end());
      open.erase(it);
    }
    mn_without[i] = (open.empty() ? -1 : open.begin()->first);
  }
  for (; q > 0; --q) {
    int t;
    ll x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    ll use = min(d0[u] + x + dg[v], d0[v] + x + dg[u]);
    if (epath_ind[t] == -1) {
      cout << min(use, d0[n - 1]) << endl;
    } else {
      if (mn_without[epath_ind[t]] == -1) {
        cout << use << endl;
      } else {
        cout << min(use, mn_without[epath_ind[t]]) << endl;
      }
    }
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, int> PLI;

vector<ll> dijkstra(const vector<vector<PII> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + g[u][i].se;
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pq.push(PII(d, v));
      }
    }
  }
  return dist;
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PII> > g(n);
  vector<pair<PII, int> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PII(v, w));
    g[v].push_back(PII(u, w));
    es.push_back(make_pair(PII(u, v), w));
  }
  vector<ll> d0 = dijkstra(g, 0);
  for (int i = 0; i < int(es.size()); ++i) {
    if (d0[es[i].fi.fi] > d0[es[i].fi.se]) {
      swap(es[i].fi.fi, es[i].fi.se);
    }
  }
  vector<ll> dg = dijkstra(g, n - 1);
  vector<pair<PLI, PII> > queries;
  vector<ll> ans(q, -1);
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    if (d0[u] == -1 || dg[u] == -1 || d0[u] == d0[v] || dg[u] < dg[v]) {
      ans[i] = d0[n - 1];
    } else {
      queries.push_back(make_pair(PLI(d0[u], i), PII(t, x)));
    }
  }
  sort(queries.begin(), queries.end());
  vector<PLI> enter;
  vector<PLI> leave;
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    if (d0[u] == -1 || dg[u] == -1) continue;
    int v = es[i].fi.se;
    if (d0[u] == d0[v] || dg[u] < dg[v]) continue;
    enter.push_back(PII(d0[u], i));
    leave.push_back(PII(d0[v], i));
  }
  sort(enter.begin(), enter.end());
  sort(leave.begin(), leave.end());
  set<PLI> cand;
  for (int iq = 0, ie = 0, il = 0; iq < int(queries.size()); ++iq) {
    int t = queries[iq].se.fi;
    int u = es[t].fi.fi;
    for (; ie < int(enter.size()) && enter[ie].fi <= d0[u]; ++ie) {
      int te = enter[ie].se;
      int ue = es[te].fi.fi;
      int ve = es[te].fi.se;
      int we = es[te].se;
      cand.insert(PLI(d0[ue] + ll(we) + dg[ve], te));
    }
    for (; il < int(leave.size()) && leave[il].fi <= d0[u]; ++il) {
      int tl = leave[il].se;
      int ul = es[tl].fi.fi;
      int vl = es[tl].fi.se;
      int wl = es[tl].se;
      ll dl = d0[ul] + ll(wl) + dg[vl];
      set<PLI>::iterator it = cand.find(PLI(dl, tl));
      assert(it != cand.end());
      cand.erase(it);
    }
    int v = es[t].fi.se;
    int w = es[t].se;
    ll d = d0[u] + ll(w) + dg[v];
    set<PLI>::iterator it = cand.find(PLI(d, t));
    assert(it != cand.end());
    cand.erase(it);
    int x = queries[iq].se.se;
    ll xd = d0[u] + ll(x) + dg[v];
    ans[queries[iq].fi.se] = (cand.empty() ? xd : min(xd, cand.begin()->first));
    cand.insert(PII(d, t));
  }
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << endl;
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, int> PLI;

vector<ll> dijkstra(const vector<vector<PII> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + g[u][i].se;
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pq.push(PII(d, v));
      }
    }
  }
  return dist;
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PII> > g(n);
  vector<pair<PII, int> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PII(v, w));
    g[v].push_back(PII(u, w));
    es.push_back(make_pair(PII(u, v), w));
  }
  vector<ll> d0 = dijkstra(g, 0);
  for (int i = 0; i < int(es.size()); ++i) {
    if (es[i].fi.fi > es[i].fi.se) {
      swap(es[i].fi.fi, es[i].fi.se);
    }
  }
  vector<ll> dg = dijkstra(g, n - 1);
  vector<pair<PLI, PII> > queries;
  vector<ll> ans(q, -1);
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    if (d0[u] == -1 || dg[u] == -1 || d0[u] == d0[v] || dg[u] < dg[v]) {
      ans[i] = d0[n - 1];
    } else {
      queries.push_back(make_pair(PLI(d0[u], i), PII(t, x)));
    }
  }
  sort(queries.begin(), queries.end());
  vector<PLI> enter;
  vector<PLI> leave;
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    if (d0[u] == -1 || dg[u] == -1) continue;
    int v = es[i].fi.se;
    if (d0[u] == d0[v] || dg[u] < dg[v]) continue;
    enter.push_back(PII(d0[u], i));
    leave.push_back(PII(d0[v], i));
  }
  sort(enter.begin(), enter.end());
  sort(leave.begin(), leave.end());
  set<PLI> cand;
  for (int iq = 0, ie = 0, il = 0; iq < int(queries.size()); ++iq) {
    int t = queries[iq].se.fi;
    int u = es[t].fi.fi;
    for (; ie < int(enter.size()) && enter[ie].fi <= d0[u]; ++ie) {
      int te = enter[ie].se;
      int ue = es[te].fi.fi;
      int ve = es[te].fi.se;
      int we = es[te].se;
      cand.insert(PLI(d0[ue] + ll(we) + dg[ve], te));
    }
    for (; il < int(leave.size()) && leave[il].fi <= d0[u]; ++il) {
      int tl = leave[il].se;
      int ul = es[tl].fi.fi;
      int vl = es[tl].fi.se;
      int wl = es[tl].se;
      ll dl = d0[ul] + ll(wl) + dg[vl];
      set<PLI>::iterator it = cand.find(PLI(dl, tl));
      assert(it != cand.end());
      cand.erase(it);
    }
    int v = es[t].fi.se;
    int w = es[t].se;
    ll d = d0[u] + ll(w) + dg[v];
    set<PLI>::iterator it = cand.find(PLI(d, t));
    assert(it != cand.end());
    cand.erase(it);
    int x = queries[iq].se.se;
    ll xd = d0[u] + ll(x) + dg[v];
    ans[queries[iq].fi.se] = (cand.empty() ? xd : min(xd, cand.begin()->first));
    cand.insert(PII(d, t));
  }
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << endl;
  }
}


#include <bits/stdc++.h>

#define DEBUG(x) cerr << #x << " = " << (x) << endl
#define fi first
#define se second

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;
typedef pair<ll, int> PLI;

vector<ll> dijkstra(const vector<vector<PII> >& g, int src) {
  int n = int(g.size());
  vector<ll> dist(n, -1);
  priority_queue<PLI, vector<PLI>, greater<PLI> > pq;
  dist[src] = 0;
  pq.push(PLI(0, src));
  for (; !pq.empty();) {
    PLI cur = pq.top();
    pq.pop();
    int u = cur.se;
    if (cur.fi > dist[u]) continue;
    for (int i = 0; i < int(g[u].size()); ++i) {
      int v = g[u][i].fi;
      ll d = dist[u] + ll(g[u][i].se);
      if (dist[v] == -1 || d < dist[v]) {
        dist[v] = d;
        pq.push(PLI(d, v));
      }
    }
  }
  return dist;
}

int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, m, q;
  cin >> n >> m >> q;
  vector<vector<PII> > g(n);
  vector<pair<PII, int> > es;
  for (int i = 0; i < m; ++i) {
    int u, v, w;
    cin >> u >> v >> w;
    --u, --v;
    g[u].push_back(PII(v, w));
    g[v].push_back(PII(u, w));
    es.push_back(make_pair(PII(u, v), w));
  }
  vector<ll> d0 = dijkstra(g, 0);
  for (int i = 0; i < int(es.size()); ++i) {
    if (d0[es[i].fi.fi] > d0[es[i].fi.se]) {
      swap(es[i].fi.fi, es[i].fi.se);
    }
  }
  vector<ll> dg = dijkstra(g, n - 1);
  vector<pair<PLI, PII> > queries;
  vector<ll> ans(q, -1);
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t >> x;
    --t;
    int u = es[t].fi.fi;
    int v = es[t].fi.se;
    if (d0[u] == -1 || dg[u] == -1 || d0[u] == d0[v] || dg[u] < dg[v]) {
      ans[i] = d0[n - 1];
    } else {
      queries.push_back(make_pair(PLI(d0[u], i), PII(t, x)));
    }
  }
  sort(queries.begin(), queries.end());
  vector<PLI> enter;
  vector<PLI> leave;
  for (int i = 0; i < m; ++i) {
    int u = es[i].fi.fi;
    if (d0[u] == -1 || dg[u] == -1) continue;
    int v = es[i].fi.se;
    assert(d0[u] <= d0[v]);
    if (d0[u] == d0[v] || dg[u] < dg[v]) continue;
    enter.push_back(PLI(d0[u], i));
    leave.push_back(PLI(d0[v], i));
  }
  sort(enter.begin(), enter.end());
  sort(leave.begin(), leave.end());
  set<PLI> cand;
  for (int iq = 0, ie = 0, il = 0; iq < int(queries.size()); ++iq) {
    int t = queries[iq].se.fi;
    int u = es[t].fi.fi;
    for (; ie < int(enter.size()) && enter[ie].fi <= d0[u]; ++ie) {
      int te = enter[ie].se;
      int ue = es[te].fi.fi;
      int ve = es[te].fi.se;
      int we = es[te].se;
      cand.insert(PLI(d0[ue] + ll(we) + dg[ve], te));
    }
    for (; il < int(leave.size()) && leave[il].fi <= d0[u]; ++il) {
      int tl = leave[il].se;
      int ul = es[tl].fi.fi;
      int vl = es[tl].fi.se;
      int wl = es[tl].se;
      ll dl = d0[ul] + ll(wl) + dg[vl];
      set<PLI>::iterator it = cand.find(PLI(dl, tl));
      assert(it != cand.end());
      cand.erase(it);
    }
    int v = es[t].fi.se;
    int w = es[t].se;
    ll d = d0[u] + ll(w) + dg[v];
    set<PLI>::iterator it = cand.find(PLI(d, t));
    assert(it != cand.end());
    cand.erase(it);
    int x = queries[iq].se.se;
    ll xd = d0[u] + ll(x) + dg[v];
    ans[queries[iq].fi.se] = (cand.empty() ? xd : min(xd, cand.begin()->first));
    cand.insert(PLI(d, t));
  }
  for (int i = 0; i < q; ++i) {
    cout << ans[i] << endl;
  }
}


#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <queue>
#define N 401000
#define int long long
typedef long long ll;
template<typename T> inline void read(T &x) {
	x = 0; char c = getchar();
	while (!isdigit(c)) c = getchar();
	while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
}
using namespace std;
const ll inf = 1e17;
template<typename T> inline void MIN(T &a, T b) {
	if (b < a)	a = b;
}
template<typename T> inline void MAX(T &a, T b) {
	if (a < b)	a = b;
}
int n, m;
struct edge{
	int nxt, to, val;
}e[N << 1];
int head[N], ecnt = 1;
struct node {
	int cur;
	ll val;
	node(int a = 0, ll b = 0) { cur = a, val = b; }
	inline bool operator <(const node &a) const {
		return val > a.val;
	}
};
ll dis[2][N];
priority_queue<node> q;
bool vis[N];
int h[N], htot, blong[N];
bool inmd[N << 1];
int l[N], r[N];

namespace SGT {
	int ls[N << 2], rs[N << 2], ttot, root;
	ll mn[N << 2], tag[N << 2];
	inline void pushup(int cur) {
		mn[cur] = min(mn[ls[cur]], mn[rs[cur]]);
	}
	void build(int L, int R, int &cur) {
		cur = ++ttot;
		mn[cur] = inf, tag[cur] = inf + 100;
		if (L == R)	return ;
		int mid = (L + R) >> 1;
		build(L, mid, ls[cur]), build(mid + 1, R, rs[cur]);
	}
	inline void pusht(int cur, ll v) {
		if (!cur)	return ;
		MIN(mn[cur], v); MIN(tag[cur], v);
	}
	inline void pushdown(int cur) {
		if (tag[cur] < inf)	pusht(ls[cur], tag[cur]), pusht(rs[cur], tag[cur]), tag[cur] = inf + 100;
	}
	void modify(int L, int R, int l, int r, ll v, int cur) {
		if (l <= L && R <= r) return pusht(cur, v), void();
		int mid = (L + R) >> 1; pushdown(cur);
		if (l <= mid)	modify(L, mid, l, r, v, ls[cur]);
		if (r > mid)	modify(mid + 1, R, l, r, v, rs[cur]);
		pushup(cur);
	}
	inline void modify(int l, int r, ll v) {
		if (l >= r)	return ;
		modify(1, htot - 1, l, r - 1, v, root);
	}
	ll query(int L, int R, int pos, int cur) {
		if (L == R)	return mn[cur];
		pushdown(cur);
		int mid = (L + R) >> 1;
		if (pos <= mid)	return query(L, mid, pos, ls[cur]);
		return query(mid + 1, R, pos, rs[cur]);
	}
	inline ll query(int p) {
		return query(1, htot - 1, p, root);
	}
}
inline void addedge(int from, int to, int val) {
	e[++ecnt] = (edge){head[from], to, val};
	head[from] = ecnt;
}

inline void dij(int s, int t) {
	memset(dis[t], 0x3f, sizeof(dis[t]));
	memset(vis, 0, sizeof(vis));
	while (q.size())	q.pop();
	dis[t][s] = 0; q.push(node(s, 0));
	while (q.size()) {
		int cur = q.top().cur; q.pop();
		if (vis[cur])	continue; vis[cur] = true;
		for (int i = head[cur]; i; i = e[i].nxt) {
			int to = e[i].to; if (dis[t][to] <= dis[t][cur] + e[i].val)	continue;
			dis[t][to] = dis[t][cur] + e[i].val; q.push(node(to, dis[t][to]));
		}
	}
}

void dfs(int cur) {
	if (cur == n) return h[++htot] = cur, blong[cur] = htot, void();
	for (int i = head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (dis[0][to] != dis[0][cur] + e[i].val)	continue;
		dfs(to); if (htot) return h[++htot] = cur, blong[cur] = htot, inmd[i] = inmd[i ^ 1] = true, void();
	}
}

void dfs_l(int cur, int yuan) {
	l[cur] = yuan;
	for (int i = head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (inmd[i] || dis[0][to] != dis[0][cur] + e[i].val || l[to])	continue;
		dfs_l(to, yuan);
	}
}
void dfs_r(int cur, int yuan) {
	r[cur] = yuan;
	for (int i= head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (inmd[i] || dis[1][to] != dis[1][cur] + e[i].val || r[to])	continue;
		dfs_r(to, yuan);
	}
}

signed main() {
	int q;
	read(n), read(m), read(q);
	for (int i = 1; i <= m; ++i) {
		int u, v, w; read(u), read(v), read(w);
		addedge(u, v, w), addedge(v, u, w);
	}
	dij(1, 0); dij(n, 1); dfs(1);
	for (int i = 1; htot - i + 1 >= i; ++i)
		swap(h[i], h[htot - i + 1]), swap(blong[h[i]], blong[h[htot - i + 1]]);//bug bug
	bool flag = false;
	for (int cur = 1; cur <= n; ++cur) if (dis[0][cur] <= inf) {
		for (int i = head[cur]; i; i = e[i].nxt) if (!inmd[i]) {
			if (dis[0][cur] + dis[1][e[i].to] + e[i].val == dis[0][n]) {//bug Rebug
				flag = true; break;
			}
		}
		if (flag)	break;
	}
	if (!flag) {
		for (int i = 1; i <= htot; ++i)//bug
			dfs_l(h[i], i), dfs_r(h[htot - i + 1], htot - i + 1);
		SGT::build(1, htot - 1, SGT::root);
		for (int cur = 1; cur <= n; ++cur) if (dis[0][cur] < inf) {
			for (int i = head[cur]; i; i = e[i].nxt) if (!inmd[i]) {
				int to = e[i].to;
				SGT::modify(l[cur], r[to], dis[0][cur] + dis[1][to] + e[i].val);
			}
		}
	}
	while (q--) {
		int jzp, vl; read(jzp), read(vl);
		jzp <<= 1;
		int u = e[jzp].to, v = e[jzp | 1].to;
		if (vl < e[jzp].val) {//bug
			ll res = dis[0][n];
			MIN(res, dis[0][u] + vl + dis[1][v]);
			MIN(res, dis[0][v] + vl + dis[1][u]);
			printf("%lld\n", res);
		} else {
			if (!inmd[jzp])	printf("%lld\n", dis[0][n]);
			else {
				ll res = flag ? dis[0][n] : min(dis[0][n] + vl - e[jzp].val, SGT::query(min(blong[u], blong[v])));
				printf("%lld\n", res);
			}
		}
	}
	return 0;
}


#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <queue>
#define N 201000
typedef long long ll;
template<typename T> inline void read(T &x) {
	x = 0; char c = getchar();
	while (!isdigit(c)) c = getchar();
	while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
}
using namespace std;
const ll inf = 1e16;
template<typename T> inline void MIN(T &a, T b) {
	if (b < a)	a = b;
}
template<typename T> inline void MAX(T &a, T b) {
	if (a < b)	a = b;
}
int n, m;
struct edge{
	int nxt, to, val;
}e[N << 1];
int head[N], ecnt = 1;
inline void addedge(int from, int to, int val) {
	e[++ecnt] = (edge){head[from], to, val};
	head[from] = ecnt;
}

struct node {
	int cur;
	ll val;
	node(int a = 0, ll b = 0) { cur = a, val = b; }
	inline bool operator <(const node &a) const {
		return val > a.val;
	}
};
ll dis[2][N];
priority_queue<node> q;
bool vis[N];
inline void dij(int s, int t) {
	//	printf("dij(%d, %d)\n", s, t);
	memset(dis[t], 0x3f, sizeof(dis[t]));
	memset(vis, 0, sizeof(vis));
	while (q.size())	q.pop();
	dis[t][s] = 0; q.push(node(s, 0));
	while (q.size()) {
		int cur = q.top().cur; q.pop();
		if (vis[cur])	continue; vis[cur] = true;
		//		printf("cur = %d\n", cur);
		for (int i = head[cur]; i; i = e[i].nxt) {
			int to = e[i].to; if (dis[t][to] <= dis[t][cur] + e[i].val)	continue;
			dis[t][to] = dis[t][cur] + e[i].val; q.push(node(to, dis[t][to]));
		}
	}
}

int h[N], htot, blong[N];
bool inmd[N << 1];
void dfs(int cur) {
	if (cur == n) return h[++htot] = cur, blong[cur] = htot, void();
	for (int i = head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (dis[0][to] != dis[0][cur] + e[i].val)	continue;
		dfs(to); if (htot) return h[++htot] = cur, blong[cur] = htot, inmd[i] = inmd[i ^ 1] = true, void();
	}
}

namespace SGT {
	int ls[N << 2], rs[N << 2], ttot, root;
	ll mn[N << 2], tag[N << 2];
	inline void pushup(int cur) {
		mn[cur] = min(mn[ls[cur]], mn[rs[cur]]);
	}
	void build(int L, int R, int &cur) {
		cur = ++ttot;
		//		printf("build(%d, %d, %d)\n", L, R, cur);
		mn[cur] = inf, tag[cur] = inf + 100;
		if (L == R)	return ;
		int mid = (L + R) >> 1;
		build(L, mid, ls[cur]), build(mid + 1, R, rs[cur]);
	}
	inline void pusht(int cur, ll v) {
		if (!cur)	return ;
		MIN(mn[cur], v); MIN(tag[cur], v);
	}
	inline void pushdown(int cur) {
		if (tag[cur] < inf)	pusht(ls[cur], tag[cur]), pusht(rs[cur], tag[cur]), tag[cur] = inf + 100;
	}
	void modify(int L, int R, int l, int r, ll v, int cur) {
		if (l <= L && R <= r) return pusht(cur, v), void();
		int mid = (L + R) >> 1; pushdown(cur);
		if (l <= mid)	modify(L, mid, l, r, v, ls[cur]);
		if (r > mid)	modify(mid + 1, R, l, r, v, rs[cur]);
		pushup(cur);
	}
	inline void modify(int l, int r, ll v) {
		//		printf("modify(%d, %d, %lld)\n", l, r, v);
		if (l >= r)	return ;
		//		printf("modify(%d, %d, %lld)\n", l, r, v);
		modify(1, htot - 1, l, r - 1, v, root);
	}
	ll query(int L, int R, int pos, int cur) {
		//		printf("query(%d, %d, %d, %d)\n", L, R, pos, cur);
		if (L == R)	return mn[cur];
		pushdown(cur);
		int mid = (L + R) >> 1;
		if (pos <= mid)	return query(L, mid, pos, ls[cur]);
		return query(mid + 1, R, pos, rs[cur]);
	}
	inline ll query(int p) {
		//		printf("query(%d) = %lld\n", p, query(1, n, p, root));
		return query(1, htot - 1, p, root);
	}
}

int l[N], r[N];
void dfs_l(int cur, int yuan) {
	//	printf("dfs_l(%d, %d)\n", cur, yuan);
	l[cur] = yuan;
	for (int i = head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (inmd[i] || dis[0][to] != dis[0][cur] + e[i].val || l[to])	continue;
		dfs_l(to, yuan);
	}
}
void dfs_r(int cur, int yuan) {
	//	printf("dfs_r(%d, %d)\n", cur, yuan);
	r[cur] = yuan;
	for (int i= head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (inmd[i] || dis[1][to] != dis[1][cur] + e[i].val || r[to])	continue;
		dfs_r(to, yuan);
	}
}

int main() {
	int q;
	read(n), read(m), read(q);
	for (int i = 1; i <= m; ++i) {
		int u, v, w; read(u), read(v), read(w);
		addedge(u, v, w), addedge(v, u, w);
	}
	dij(1, 0); dij(n, 1); dfs(1);
	for (int i = 1; htot - i + 1 >= i; ++i)	swap(h[i], h[htot - i + 1]);//bug
	bool flag = false;
	for (int cur = 1; cur <= n; ++cur) if (dis[0][cur] <= inf) {
		for (int i = head[cur]; i; i = e[i].nxt) if (!inmd[i]) {
			if (dis[0][cur] + dis[1][e[i].to] + e[i].val == dis[0][n]) {//bug Rebug
				flag = true; break;
			}
		}
		if (flag)	break;
	}
	if (!flag) {
		for (int i = 1; i <= htot; ++i)//bug
			dfs_l(h[i], i), dfs_r(h[htot - i + 1], htot - i + 1);
		SGT::build(1, htot - 1, SGT::root);
		for (int cur = 1; cur <= n; ++cur) if (dis[0][cur] < inf) {
			for (int i = head[cur]; i; i = e[i].nxt) if (!inmd[i]) {
				int to = e[i].to;
				//				printf("dis[0][%d] = %lld, dis[1][%d] = %lld\n", cur, dis[0][cur], to, dis[1][to]);
				SGT::modify(l[cur], r[to], dis[0][cur] + dis[1][to] + e[i].val);
			}
		}
	}
	while (q--) {
		int jzp, vl; read(jzp), read(vl);
		jzp <<= 1;
		int u = e[jzp].to, v = e[jzp | 1].to;
		if (vl < e[jzp].val) {//bug
			ll res = dis[0][n];
			MIN(res, dis[0][u] + vl + dis[1][v]);
			MIN(res, dis[0][v] + vl + dis[1][u]);
			printf("%lld\n", res);
		} else {
			if (!inmd[jzp])	printf("%lld\n", dis[0][n]);
			else {
				//			printf("dis[0][%d] = %lld, %d, blong[%d] = %d, blong[%d] = %d\n", n, dis[0][n], vl - e[jzp].val, u, blong[u], v, blong[v]);
				ll res = flag ? dis[0][n] : min(dis[0][n] + vl - e[jzp].val, SGT::query(min(blong[u], blong[v])));
				printf("%lld\n", res);
			}
		}
	}
	return 0;
}


#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <queue>
#define N 401000
#define int long long
typedef long long ll;
template<typename T> inline void read(T &x) {
	x = 0; char c = getchar();
	while (!isdigit(c)) c = getchar();
	while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
}
using namespace std;
const ll inf = 1e17;
template<typename T> inline void MIN(T &a, T b) {
	if (b < a)	a = b;
}
template<typename T> inline void MAX(T &a, T b) {
	if (a < b)	a = b;
}
int n, m;
struct edge{
	int nxt, to, val;
}e[N << 1];
int head[N], ecnt = 1;
inline void addedge(int from, int to, int val) {
	e[++ecnt] = (edge){head[from], to, val};
	head[from] = ecnt;
}

struct node {
	int cur;
	ll val;
	node(int a = 0, ll b = 0) { cur = a, val = b; }
	inline bool operator <(const node &a) const {
		return val > a.val;
	}
};
ll dis[2][N];
priority_queue<node> q;
bool vis[N];
inline void dij(int s, int t) {
//	printf("dij(%d, %d)\n", s, t);
	memset(dis[t], 0x3f, sizeof(dis[t]));
	memset(vis, 0, sizeof(vis));
	while (q.size())	q.pop();
	dis[t][s] = 0; q.push(node(s, 0));
	while (q.size()) {
		int cur = q.top().cur; q.pop();
		if (vis[cur])	continue; vis[cur] = true;
//		printf("cur = %d\n", cur);
		for (int i = head[cur]; i; i = e[i].nxt) {
			int to = e[i].to; if (dis[t][to] <= dis[t][cur] + e[i].val)	continue;
			dis[t][to] = dis[t][cur] + e[i].val; q.push(node(to, dis[t][to]));
		}
	}
}

int h[N], htot, blong[N];
bool inmd[N << 1];
void dfs(int cur) {
	if (cur == n) return h[++htot] = cur, blong[cur] = htot, void();
	for (int i = head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (dis[0][to] != dis[0][cur] + e[i].val)	continue;
		dfs(to); if (htot) return h[++htot] = cur, blong[cur] = htot, inmd[i] = inmd[i ^ 1] = true, void();
	}
}

namespace SGT {
	int ls[N << 2], rs[N << 2], ttot, root;
	ll mn[N << 2], tag[N << 2];
	inline void pushup(int cur) {
		mn[cur] = min(mn[ls[cur]], mn[rs[cur]]);
	}
	void build(int L, int R, int &cur) {
		cur = ++ttot;
//		printf("build(%d, %d, %d)\n", L, R, cur);
		mn[cur] = inf, tag[cur] = inf + 100;
		if (L == R)	return ;
		int mid = (L + R) >> 1;
		build(L, mid, ls[cur]), build(mid + 1, R, rs[cur]);
	}
	inline void pusht(int cur, ll v) {
		if (!cur)	return ;
		MIN(mn[cur], v); MIN(tag[cur], v);
	}
	inline void pushdown(int cur) {
		if (tag[cur] < inf)	pusht(ls[cur], tag[cur]), pusht(rs[cur], tag[cur]), tag[cur] = inf + 100;
	}
	void modify(int L, int R, int l, int r, ll v, int cur) {
		if (l <= L && R <= r) return pusht(cur, v), void();
		int mid = (L + R) >> 1; pushdown(cur);
		if (l <= mid)	modify(L, mid, l, r, v, ls[cur]);
		if (r > mid)	modify(mid + 1, R, l, r, v, rs[cur]);
		pushup(cur);
	}
	inline void modify(int l, int r, ll v) {
//		printf("modify(%d, %d, %lld)\n", l, r, v);
		if (l >= r)	return ;
//		printf("modify(%d, %d, %lld)\n", l, r, v);
		modify(1, htot - 1, l, r - 1, v, root);
	}
	ll query(int L, int R, int pos, int cur) {
//		printf("query(%d, %d, %d, %d)\n", L, R, pos, cur);
		if (L == R)	return mn[cur];
		pushdown(cur);
		int mid = (L + R) >> 1;
		if (pos <= mid)	return query(L, mid, pos, ls[cur]);
		return query(mid + 1, R, pos, rs[cur]);
	}
	inline ll query(int p) {
//		printf("query(%d) = %lld\n", p, query(1, n, p, root));
		return query(1, htot - 1, p, root);
	}
}

int l[N], r[N];
void dfs_l(int cur, int yuan) {
//	printf("dfs_l(%d, %d)\n", cur, yuan);
	l[cur] = yuan;
	for (int i = head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (inmd[i] || dis[0][to] != dis[0][cur] + e[i].val || l[to])	continue;
		dfs_l(to, yuan);
	}
}
void dfs_r(int cur, int yuan) {
//	printf("dfs_r(%d, %d)\n", cur, yuan);
	r[cur] = yuan;
	for (int i= head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (inmd[i] || dis[1][to] != dis[1][cur] + e[i].val || r[to])	continue;
		dfs_r(to, yuan);
	}
}

signed main() {
	int q;
	read(n), read(m), read(q);
	for (int i = 1; i <= m; ++i) {
		int u, v, w; read(u), read(v), read(w);
		addedge(u, v, w), addedge(v, u, w);
	}
	dij(1, 0); dij(n, 1); dfs(1);
	for (int i = 1; htot - i + 1 >= i; ++i)	swap(h[i], h[htot - i + 1]);//bug
	bool flag = false;
	for (int cur = 1; cur <= n; ++cur) if (dis[0][cur] <= inf) {
		for (int i = head[cur]; i; i = e[i].nxt) if (!inmd[i]) {
			if (dis[0][cur] + dis[1][e[i].to] + e[i].val == dis[0][n]) {//bug Rebug
				flag = true; break;
			}
		}
		if (flag)	break;
	}
	if (!flag) {
		for (int i = 1; i <= htot; ++i)//bug
			dfs_l(h[i], i), dfs_r(h[htot - i + 1], htot - i + 1);
		SGT::build(1, htot - 1, SGT::root);
		for (int cur = 1; cur <= n; ++cur) if (dis[0][cur] < inf) {
			for (int i = head[cur]; i; i = e[i].nxt) if (!inmd[i]) {
				int to = e[i].to;
//				printf("dis[0][%d] = %lld, dis[1][%d] = %lld\n", cur, dis[0][cur], to, dis[1][to]);
				SGT::modify(l[cur], r[to], dis[0][cur] + dis[1][to] + e[i].val);
			}
		}
	}
	while (q--) {
		int jzp, vl; read(jzp), read(vl);
		jzp <<= 1;
		int u = e[jzp].to, v = e[jzp | 1].to;
		if (vl < e[jzp].val) {//bug
			ll res = dis[0][n];
			MIN(res, dis[0][u] + vl + dis[1][v]);
			MIN(res, dis[0][v] + vl + dis[1][u]);
			printf("%lld\n", res);
		} else {
			if (!inmd[jzp])	printf("%lld\n", dis[0][n]);
			else {
	//			printf("dis[0][%d] = %lld, %d, blong[%d] = %d, blong[%d] = %d\n", n, dis[0][n], vl - e[jzp].val, u, blong[u], v, blong[v]);
				ll res = flag ? dis[0][n] : min(dis[0][n] + vl - e[jzp].val, SGT::query(min(blong[u], blong[v])));
				printf("%lld\n", res);
			}
		}
	}
	return 0;
}


#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <queue>
#define N 401000
#define int long long
typedef long long ll;
template<typename T> inline void read(T &x) {
	x = 0; char c = getchar();
	while (!isdigit(c)) c = getchar();
	while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
}
using namespace std;
const ll inf = 1e17;
template<typename T> inline void MIN(T &a, T b) {
	if (b < a)	a = b;
}
template<typename T> inline void MAX(T &a, T b) {
	if (a < b)	a = b;
}
int n, m;
struct edge{
	int nxt, to, val;
}e[N << 1];
int head[N], ecnt = 1;
struct node {
	int cur;
	ll val;
	node(int a = 0, ll b = 0) { cur = a, val = b; }
	inline bool operator <(const node &a) const {
		return val > a.val;
	}
};
ll dis[2][N];
priority_queue<node> q;
bool vis[N];
int h[N], htot, blong[N];
bool inmd[N << 1];
int l[N], r[N];

namespace SGT {
	int ls[N << 2], rs[N << 2], ttot, root;
	ll mn[N << 2], tag[N << 2];
	inline void pushup(int cur) {
		mn[cur] = min(mn[ls[cur]], mn[rs[cur]]);
	}
	void build(int L, int R, int &cur) {
		cur = ++ttot;
		mn[cur] = inf, tag[cur] = inf + 100;
		if (L == R)	return ;
		int mid = (L + R) >> 1;
		build(L, mid, ls[cur]), build(mid + 1, R, rs[cur]);
	}
	inline void pusht(int cur, ll v) {
		if (!cur)	return ;
		MIN(mn[cur], v); MIN(tag[cur], v);
	}
	inline void pushdown(int cur) {
		if (tag[cur] < inf)	pusht(ls[cur], tag[cur]), pusht(rs[cur], tag[cur]), tag[cur] = inf + 100;
	}
	void modify(int L, int R, int l, int r, ll v, int cur) {
		if (l <= L && R <= r) return pusht(cur, v), void();
		int mid = (L + R) >> 1; pushdown(cur);
		if (l <= mid)	modify(L, mid, l, r, v, ls[cur]);
		if (r > mid)	modify(mid + 1, R, l, r, v, rs[cur]);
		pushup(cur);
	}
	inline void modify(int l, int r, ll v) {
		if (l >= r)	return ;
		modify(1, htot - 1, l, r - 1, v, root);
	}
	ll query(int L, int R, int pos, int cur) {
		if (L == R)	return mn[cur];
		pushdown(cur);
		int mid = (L + R) >> 1;
		if (pos <= mid)	return query(L, mid, pos, ls[cur]);
		return query(mid + 1, R, pos, rs[cur]);
	}
	inline ll query(int p) {
		return query(1, htot - 1, p, root);
	}
}
inline void addedge(int from, int to, int val) {
	e[++ecnt] = (edge){head[from], to, val};
	head[from] = ecnt;
}

inline void dij(int s, int t) {
	memset(dis[t], 0x3f, sizeof(dis[t]));
	memset(vis, 0, sizeof(vis));
	while (q.size())	q.pop();
	dis[t][s] = 0; q.push(node(s, 0));
	while (q.size()) {
		int cur = q.top().cur; q.pop();
		if (vis[cur])	continue; vis[cur] = true;
		for (int i = head[cur]; i; i = e[i].nxt) {
			int to = e[i].to; if (dis[t][to] <= dis[t][cur] + e[i].val)	continue;
			dis[t][to] = dis[t][cur] + e[i].val; q.push(node(to, dis[t][to]));
		}
	}
}

void dfs(int cur) {
	if (cur == n) return h[++htot] = cur, blong[cur] = htot, void();
	for (int i = head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (dis[0][to] != dis[0][cur] + e[i].val)	continue;
		dfs(to); if (htot) return h[++htot] = cur, blong[cur] = htot, inmd[i] = inmd[i ^ 1] = true, void();
	}
}

void dfs_l(int cur, int yuan) {
	l[cur] = yuan;
	for (int i = head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (inmd[i] || dis[0][to] != dis[0][cur] + e[i].val || l[to])	continue;
		dfs_l(to, yuan);
	}
}
void dfs_r(int cur, int yuan) {
	r[cur] = yuan;
	for (int i= head[cur]; i; i = e[i].nxt) {
		int to = e[i].to; if (inmd[i] || dis[1][to] != dis[1][cur] + e[i].val || r[to])	continue;
		dfs_r(to, yuan);
	}
}

signed main() {
	int q;
	read(n), read(m), read(q);
	for (int i = 1; i <= m; ++i) {
		int u, v, w; read(u), read(v), read(w);
		addedge(u, v, w), addedge(v, u, w);
	}
	dij(1, 0);	dij(n, 1);	dfs(1);
	for (int i = 1; htot - i + 1 >= i; ++i)
		swap(h[i], h[htot - i + 1]), swap(blong[h[i]], blong[h[htot - i + 1]]);//bug bug
	for (int i = 1; i <= htot; ++i)//bug
		dfs_l(h[i], i), dfs_r(h[htot - i + 1], htot - i + 1);
	SGT::build(1, htot - 1, SGT::root);
	for (int cur = 1; cur <= n; ++cur) if (dis[0][cur] < inf) {
		for (int i = head[cur]; i; i = e[i].nxt) if (!inmd[i]) {
			int to = e[i].to;
			SGT::modify(l[cur], r[to], dis[0][cur] + dis[1][to] + e[i].val);
		}
	}
	while (q--) {
		int jzp, vl; read(jzp), read(vl);
		jzp <<= 1;
		int u = e[jzp].to, v = e[jzp | 1].to;
		if (vl < e[jzp].val) {//bug
			ll res = dis[0][n];
			MIN(res, dis[0][u] + vl + dis[1][v]);
			MIN(res, dis[0][v] + vl + dis[1][u]);
			printf("%lld\n", res);
		} else {
			if (!inmd[jzp])	printf("%lld\n", dis[0][n]);
			else {
				ll res = min(dis[0][n] + vl - e[jzp].val, SGT::query(min(blong[u], blong[v])));
				printf("%lld\n", res);
			}
		}
	}
	return 0;
}