#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
bool vis[N];
ll y,b[N],dis[2][N],tr[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][20];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<=17;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=17;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=17;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushdown(int rt)
{
	lazy[rt<<1]=lazy[rt<<1|1]=1;
	tr[rt<<1]=min(tr[rt<<1],tr[rt]);
	tr[rt<<1|1]=min(tr[rt<<1|1],tr[rt]);
	lazy[rt]=0;
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(L<=l&&r<=R)
	{
		if(tr[rt]>x)
		{
			lazy[rt]=1;
			tr[rt]=min(tr[rt],x);
		}
		return;
	}
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	ll mn=1e18;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int x=lca(u,n,0),y=lca(v,1,1);
		if(id[x]<id[y])
			update(id[x]+1,id[y],d,1,bnt,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
		{
			ll ans=dis[0][u]+y+dis[1][v];
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,bnt,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][u]+y+dis[1][v]));
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
bool vis[N];
ll y,b[N],dis[2][N],tr[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][20];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1;
	ll mn=1e18;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int x=lca(u,n,0),y=lca(v,1,1);
		if(id[x]<id[y])
			update(id[x]+1,id[y],d,1,bnt,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
		{
			ll ans=dis[0][u]+y+dis[1][v];
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,bnt,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][u]+y+dis[1][v]));
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define rint register int
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
const ll inf=1e18;
bool vis[N];
int n,m,t,x,ant,bnt,cnt,dnt[2];
int a[N],b[N],id[N],head[N],head2[2][N],pre[2][N],dep[2][N],p[2][N][20];
ll y,c[N],dis[2][N],tr[N<<2];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v;
	ll w;
	int next;
}e[N<<1],f[2][N<<2];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,w,head[u]};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++dnt[op]]=(node){v,0,head2[op][u]};
	head2[op][u]=dnt[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int op)
{
	int st=op?n:1;
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline bool ch(int x)
{
	return dis[0][a[x]]+c[x]+dis[1][b[x]]==dis[0][n]&&(pre[0][b[x]]==a[x]||pre[1][a[x]]==b[x]);
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushup(int rt)
{
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	pushup(rt);
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	pushup(rt);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1;
	ll mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
signed main()
{
	read(n),read(m),read(t);
	memset(pre,-1,sizeof pre);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	for(rint i=1;i<=n;++i)
		dis[0][i]=dis[1][i]=inf;
	dij(0),dij(1);
	x=1;
	while(x!=n)
	{
		id[x]=++ant;
		x=pre[1][x];
	}
	id[n]=++ant;
	for(rint i=1;i<=n;++i)
		bdde(pre[0][i],i,0),bdde(i,pre[0][i],0);
	for(rint i=1;i<=n;++i)
		bdde(pre[1][i],i,1),bdde(i,pre[1][i],1);
	dfs(1,-1,0),dfs(n,-1,1);
	build(1,ant,1);
	for(rint i=1;i<=m;++i)
		if(!ch(i))
		{
			x=id[lca(a[i],n,0)],y=id[lca(b[i],1,1)];
			if(x!=y)
				update(x,y,dis[0][a[i]]+c[i]+dis[1][b[i]],1,ant,1);
		}
	while(t--)
	{
		read(x),read(y);
		if(ch(x))
		{
			if(y<c[x])
				printf("%lld\n",dis[0][n]-c[x]+y);
			else
				printf("%lld\n",min(dis[0][n]+y-c[x],query(id[a[x]],id[b[x]],1,ant,1)));
		}
		else
			if(y<c[x])
				printf("%lld\n",min(dis[0][n],dis[0][a[x]]+y+dis[1][b[x]]));
		else
			printf("%lld\n",dis[0][n]);
	}
	return 0;
}


#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
bool vis[N];
ll y,b[N],dis[2][N],tr[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][20];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1;
	ll mn=1e18;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int x=lca(u,n,0),y=lca(v,1,1);
		if(id[x]<id[y])
			update(id[x]+1,id[y],d,1,bnt,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
		{
			ll ans=dis[0][u]+y+dis[1][v];
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,bnt,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][u]+y+dis[1][v]));
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
const ll inf=1e18;
ll y,b[N],dis[2][N],tr[N<<2],lazy[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][30];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<=20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=20;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=20;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=lazy[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
	lazy[rt]=min(lazy[rt<<1],lazy[rt<<1|1]);
}
inline void pushdown(int rt)
{
	lazy[rt<<1]=min(lazy[rt<<1],lazy[rt]);
	lazy[rt<<1|1]=min(lazy[rt<<1|1],lazy[rt]);
	tr[rt<<1]=min(tr[rt<<1],lazy[rt]);
	tr[rt<<1|1]=min(tr[rt<<1|1],lazy[rt]);
	lazy[rt]=inf;
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(L<=l&&r<=R)
	{
		lazy[rt]=min(lazy[rt],x);
		tr[rt]=min(tr[rt],x);
		return;
	}
	pushdown(rt);
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1;
	pushdown(rt);
	ll mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	build(1,bnt,1);
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]+dis[1][v]>dis[0][v]+dis[1][u])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int z=lca(u,n,0),w=lca(v,1,1);
		if(id[z]<id[w])
			update(id[z]+1,id[w],d,1,bnt,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v],ans=dis[0][u]+y+dis[1][v];
		if(d!=dis[0][n]||(pre[0][v]!=u&&pre[1][u]!=v))
			ans=min(ans,dis[0][n]);
		else
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,bnt,1));
		printf("%lld\n",ans);
	}
	return 0;
}//


#pragma GCC optimize(2)
#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define int long long
#define rint register int
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
using namespace std;
typedef pair<int,int>pii;
const int N=200000+10,inf=1e18;
bool vis[N];
int n,m,t,x,y,bnt,cnt,dnt[2];
int a[N],b[N],c[N],id[N],head[N],head2[2][N],pre[2][N],dis[2][N],dep[2][N],p[2][N][20],tr[N<<2];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,w,next;
}e[N<<1],f[2][N<<2];
inline void adde(int u,int v,int w)
{
	e[++cnt]=(node){v,w,head[u]};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++dnt[op]]=(node){v,0,head2[op][u]};
	head2[op][u]=dnt[op];
}
inline void read(int &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int op)
{
	int st=op?n:1;
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline bool ch(int x)
{
	return dis[0][a[x]]+c[x]+dis[1][b[x]]==dis[0][n]&&(pre[0][b[x]]==a[x]||pre[1][a[x]]==b[x]);
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushup(int rt)
{
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	pushup(rt);
}
void update(int L,int R,int x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	pushup(rt);
}
int query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1,mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
signed main()
{
//	freopen("1.in","r",stdin);
//	freopen("1.out","w",stdout);
	read(n),read(m),read(t);
	memset(pre,-1,sizeof pre);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	for(rint i=1;i<=n;++i)
		dis[0][i]=dis[1][i]=inf;
	dij(0),dij(1);
	for(rint i=1;i<=m;++i)
		if(dis[0][a[i]]>dis[0][b[i]])
			swap(a[i],b[i]);
	for(rint i=1;i<=n;++i)
		bdde(pre[0][i],i,0),bdde(i,pre[0][i],0);
	for(rint i=1;i<=n;++i)
		bdde(pre[1][i],i,1),bdde(i,pre[1][i],1);
	dfs(1,-1,0),dfs(n,-1,1);
	build(1,n,1);
	for(rint i=1;i<=m;++i)
		if(!ch(i))
		{
			x=lca(a[i],n,0),y=lca(b[i],1,1);
			if(x!=y)
				update(x,y,dis[0][a[i]]+c[i]+dis[1][b[i]],1,n,1);
		}
	while(t--)
	{
		read(x),read(y);
		if(ch(x))
		{
			if(y<c[x])
				printf("%lld\n",dis[0][n]-c[x]+y);
			else
				printf("%lld\n",min(dis[0][n]+y-c[x],query(a[x],b[x],1,n,1)));
		}
		else
			if(y<c[x])
				printf("%lld\n",min(dis[0][n],dis[0][a[x]]+y+dis[1][b[x]]));
		else
			printf("%lld\n",dis[0][n]);
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define rint register int
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
const ll inf=1e18;
bool vis[N];
int n,m,t,x,bnt,cnt,dnt[2];
int a[N],b[N],head[N],head2[2][N],pre[2][N],dep[2][N],p[2][N][20];
ll y,c[N],dis[2][N],tr[N<<2];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v;
	ll w;
	int next;
}e[N<<1],f[2][N<<2];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,w,head[u]};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++dnt[op]]=(node){v,0,head2[op][u]};
	head2[op][u]=dnt[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int op)
{
	int st=op?n:1;
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline bool ch(int x)
{
	return dis[0][a[x]]+c[x]+dis[1][b[x]]==dis[0][n]&&(pre[0][b[x]]==a[x]||pre[1][a[x]]==b[x]);
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushup(int rt)
{
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	pushup(rt);
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	pushup(rt);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1;
	ll mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
signed main()
{
	read(n),read(m),read(t);
	memset(pre,-1,sizeof pre);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	for(rint i=1;i<=n;++i)
		dis[0][i]=dis[1][i]=inf;
	dij(0),dij(1);
	for(rint i=1;i<=m;++i)
		if(dis[0][a[i]]>dis[0][b[i]])
			swap(a[i],b[i]);
	for(rint i=1;i<=n;++i)
		bdde(pre[0][i],i,0),bdde(i,pre[0][i],0);
	for(rint i=1;i<=n;++i)
		bdde(pre[1][i],i,1),bdde(i,pre[1][i],1);
	dfs(1,-1,0),dfs(n,-1,1);
	build(1,n,1);
	for(rint i=1;i<=m;++i)
		if(!ch(i))
		{
			x=lca(a[i],n,0),y=lca(b[i],1,1);
			if(x!=y)
				update(x,y,dis[0][a[i]]+c[i]+dis[1][b[i]],1,n,1);
		}
	while(t--)
	{
		read(x),read(y);
		if(ch(x))
		{
			if(y<c[x])
				printf("%lld\n",dis[0][n]-c[x]+y);
			else
				printf("%lld\n",min(dis[0][n]+y-c[x],query(a[x],b[x],1,n,1)));
		}
		else
			if(y<c[x])
				printf("%lld\n",min(dis[0][n],dis[0][a[x]]+y+dis[1][b[x]]));
		else
			printf("%lld\n",dis[0][n]);
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define rint register int
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
const ll inf=1e18;
bool vis[N];
int n,m,t,x,ant,bnt,cnt,dnt[2];
int a[N],b[N],id[N],head[N],head2[2][N],pre[2][N],dep[2][N],p[2][N][20];
ll y,c[N],dis[2][N],tr[N<<2];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v;
	ll w;
	int next;
}e[N<<1],f[2][N<<2];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,w,head[u]};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++dnt[op]]=(node){v,0,head2[op][u]};
	head2[op][u]=dnt[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int op)
{
	int st=op?n:1;
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline bool ch(int x)
{
	return dis[0][a[x]]+c[x]+dis[1][b[x]]==dis[0][n]&&(pre[0][b[x]]==a[x]||pre[1][a[x]]==b[x]);
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushup(int rt)
{
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	pushup(rt);
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	pushup(rt);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1;
	ll mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
signed main()
{
	read(n),read(m),read(t);
	memset(pre,-1,sizeof pre);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	for(rint i=1;i<=n;++i)
		dis[0][i]=dis[1][i]=inf;
	dij(0),dij(1);
	for(rint i=1;i<=m;++i)
		if(dis[0][a[i]]>dis[0][b[i]])
			swap(a[i],b[i]);
	x=1;
	while(x!=n)
	{
		id[x]=++ant;
		x=pre[1][x];
	}
	id[n]=++ant;
	for(rint i=1;i<=n;++i)
		bdde(pre[0][i],i,0),bdde(i,pre[0][i],0);
	for(rint i=1;i<=n;++i)
		bdde(pre[1][i],i,1),bdde(i,pre[1][i],1);
	dfs(1,-1,0),dfs(n,-1,1);
	build(1,ant,1);
	for(rint i=1;i<=m;++i)
		if(!ch(i))
		{
			x=id[lca(a[i],n,0)],y=id[lca(b[i],1,1)];
			if(x!=y)
				update(x,y,dis[0][a[i]]+c[i]+dis[1][b[i]],1,ant,1);
		}
	while(t--)
	{
		read(x),read(y);
		if(ch(x))
		{
			if(y<c[x])
				printf("%lld\n",dis[0][n]-c[x]+y);
			else
				printf("%lld\n",min(dis[0][n]+y-c[x],query(id[a[x]],id[b[x]],1,ant,1)));
		}
		else
			if(y<c[x])
				printf("%lld\n",min(dis[0][n],dis[0][a[x]]+y+dis[1][b[x]]));
		else
			printf("%lld\n",dis[0][n]);
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define int long long
#define rint register int
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
using namespace std;
typedef pair<int,int>pii;
const int N=200000+10,inf=1e18;
bool vis[N];
int n,m,t,x,y,bnt,cnt,dnt[2];
int a[N],b[N],c[N],id[N],head[N],head2[2][N],pre[2][N],dis[2][N],dep[2][N],p[2][N][20],tr[N<<2];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,w,next;
}e[N<<1],f[2][N<<2];
inline void adde(int u,int v,int w)
{
	e[++cnt]=(node){v,w,head[u]};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++dnt[op]]=(node){v,0,head2[op][u]};
	head2[op][u]=dnt[op];
}
inline void read(int &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int op)
{
	int st=op?n:1;
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline bool ch(int x)
{
	return dis[0][a[x]]+c[x]+dis[1][b[x]]==dis[0][n];
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushup(int rt)
{
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	pushup(rt);
}
void update(int L,int R,int x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	pushup(rt);
}
int query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1,mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
signed main()
{
	read(n),read(m),read(t);
	memset(pre,-1,sizeof pre);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	memset(dis,0x3f,sizeof dis);
	dij(0),dij(1);
	for(rint i=1;i<=m;++i)
		if(dis[0][a[i]]>dis[0][b[i]])
			swap(a[i],b[i]);
	for(rint i=1;i<=n;++i)
		bdde(pre[0][i],i,0),bdde(i,pre[0][i],0);
	for(rint i=1;i<=n;++i)
		bdde(pre[1][i],i,1),bdde(i,pre[1][i],1);
	dfs(1,-1,0),dfs(n,-1,1);
	build(1,n,1);
	for(rint i=1;i<=m;++i)
		if(!ch(i))
		{
			x=lca(a[i],n,0),y=lca(b[i],1,1);
			update(x,y,dis[0][a[i]]+c[i]+dis[1][b[i]],1,n,1);
		}
	while(t--)
	{
		read(x),read(y);
		if(ch(x))
		{
			if(y<c[x])
				printf("%lld\n",dis[0][n]-c[x]+y);
			else
				printf("%lld\n",min(dis[0][n]+y-c[x],query(a[x],b[x],1,n,1)));
		}
		else
			if(y<c[x])
				printf("%lld\n",min(dis[0][n],dis[0][a[x]]+y+dis[1][b[x]]));
		else
			printf("%lld\n",dis[0][n]);
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
bool vis[N],lazy[N<<2];
ll y,b[N],dis[2][N],tr[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][20];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushdown(int rt)
{
	lazy[rt<<1]=lazy[rt<<1|1]=1;
	tr[rt<<1]=min(tr[rt<<1],tr[rt]);
	tr[rt<<1|1]=min(tr[rt<<1|1],tr[rt]);
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(L<=l&&r<=R)
	{
		if(tr[rt]>x)
		{
			lazy[rt]=1;
			tr[rt]=min(tr[rt],x);
		}
		return;
	}
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	ll mn=1e18;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int x=lca(u,n,0),y=lca(v,1,1);
		if(id[x]<id[y])
			update(id[x]+1,id[y],d,1,n,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
		{
			ll ans=dis[0][u]+y+dis[1][v];
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,n,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][u]+y+dis[1][v]));
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
bool vis[N],lazy[N<<2];
ll y,b[N],dis[2][N],tr[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][20];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushdown(int rt)
{
	lazy[rt<<1]=lazy[rt<<1|1]=1;
	tr[rt<<1]=min(tr[rt<<1],tr[rt]);
	tr[rt<<1|1]=min(tr[rt<<1|1],tr[rt]);
	lazy[rt]=0;
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(L<=l&&r<=R)
	{
		lazy[rt]=1;
		tr[rt]=min(tr[rt],x);
		return;
	}
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	ll mn=1e18;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int x=lca(u,n,0),y=lca(v,1,1);
		if(id[x]<id[y])
			update(id[x]+1,id[y],d,1,bnt,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
		{
			ll ans=dis[0][u]+y+dis[1][v];
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,bnt,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][u]+y+dis[1][v]));
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
bool vis[N],lazy[N<<2];
ll y,b[N],dis[2][N],tr[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][20];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<=17;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=17;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=17;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushdown(int rt)
{
	lazy[rt<<1]=lazy[rt<<1|1]=1;
	tr[rt<<1]=min(tr[rt<<1],tr[rt]);
	tr[rt<<1|1]=min(tr[rt<<1|1],tr[rt]);
	lazy[rt]=0;
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(L<=l&&r<=R)
	{
		if(tr[rt]>x)
		{
			lazy[rt]=1;
			tr[rt]=min(tr[rt],x);
		}
		return;
	}
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	ll mn=1e18;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int x=lca(u,n,0),y=lca(v,1,1);
		if(id[x]<id[y])
			update(id[x]+1,id[y],d,1,bnt,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
		{
			ll ans=dis[0][u]+y+dis[1][v];
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,bnt,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][u]+y+dis[1][v]));
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define int long long
#define rint register int
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
using namespace std;
typedef pair<int,int>pii;
const int N=200000+10,inf=0x3f3f3f3f;
bool vis[N];
int n,m,t,x,y,bnt,cnt,dnt[2];
int a[N],b[N],c[N],id[N],head[N],head2[2][N],pre[2][N],dis[2][N],dep[2][N],p[2][N][20],tr[N<<2];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,w,next;
}e[N<<1],f[2][N<<2];
inline void adde(int u,int v,int w)
{
	e[++cnt]=(node){v,w,head[u]};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++dnt[op]]=(node){v,0,head2[op][u]};
	head2[op][u]=dnt[op];
}
inline void read(int &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int op)
{
	int st=op?n:1;
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline bool ch(int x)
{
	return dis[0][a[x]]+c[x]+dis[1][b[x]]==dis[0][n];
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushup(int rt)
{
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	pushup(rt);
}
void update(int L,int R,int x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	pushup(rt);
}
int query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1,mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
signed main()
{
	read(n),read(m),read(t);
	memset(pre,-1,sizeof pre);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	memset(dis,0x3f,sizeof dis);
	dij(0),dij(1);
	for(rint i=1;i<=m;++i)
		if(dis[0][a[i]]>dis[0][b[i]])
			swap(a[i],b[i]);
	for(rint i=1;i<=n;++i)
		bdde(pre[0][i],i,0),bdde(i,pre[0][i],0);
	for(rint i=1;i<=n;++i)
		bdde(pre[1][i],i,1),bdde(i,pre[1][i],1);
	dfs(1,-1,0),dfs(n,-1,1);
	build(1,n,1);
	for(rint i=1;i<=m;++i)
		if(!ch(i))
		{
			x=lca(a[i],n,0),y=lca(b[i],1,1);
			update(x,y,dis[0][a[i]]+c[i]+dis[1][b[i]],1,n,1);
		}
	while(t--)
	{
		read(x),read(y);
		if(ch(x))
		{
			if(y<c[x])
				printf("%d\n",dis[0][n]-c[x]+y);
			else
				printf("%d\n",min(dis[0][n]+y-c[x],query(a[x],b[x],1,n,1)));
		}
		else
			if(y<c[x])
				printf("%d\n",min(dis[0][n],dis[0][a[x]]+y+dis[1][b[x]]));
		else
			printf("%d\n",dis[0][n]);
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define rint register int
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
const ll inf=1e18;
bool vis[N];
int n,m,t,x,ant,bnt,cnt,dnt[2];
int a[N],b[N],id[N],head[N],head2[2][N],dep[2][N],p[2][N][20];
ll y,c[N],dis[2][N],tr[N<<2];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v;
	ll w;
	int next;
}e[N<<1],f[2][N<<2];
struct mode
{
	int l,r;
}l[2][N];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,w,head[u]};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++dnt[op]]=(node){v,0,head2[op][u]};
	head2[op][u]=dnt[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int op)
{
	int st=op?n:1;
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				l[op][v].l=u;
				l[op][u].r=v;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline bool ch(int x)
{
	return dis[0][a[x]]+c[x]+dis[1][b[x]]==dis[0][n]&&(l[0][b[x]].l==a[x]||l[1][a[x]].l==b[x]);
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushup(int rt)
{
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	pushup(rt);
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	pushup(rt);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1;
	ll mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
inline void change(int x,int y,int op)
{
	int z=l[op][x].l,w=l[op][y].r;
	l[op][z].r=y;
	l[op][y].l=z;
	l[op][x].r=w;
	l[op][w].l=x;
	l[op][y].r=x;
	l[op][x].l=y;
}
signed main()
{
	read(n),read(m),read(t);
	memset(l,-1,sizeof l);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		if(a[i]>b[i])
			swap(a[i],b[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	for(rint i=1;i<=n;++i)
		dis[0][i]=dis[1][i]=inf;
	dij(0),dij(1);
	for(rint i=1;i<=m;++i)
		if(dis[0][a[i]]>dis[0][b[i]])
			change(a[i],b[i],0),change(a[i],b[i],1),swap(a[i],b[i]);
	x=1;
	while(x!=n)
	{
		id[x]=++ant;
		x=l[1][x].l;
	}
	id[n]=++ant;
	for(rint i=1;i<=n;++i)
		bdde(l[0][i].l,i,0),bdde(i,l[0][i].l,0);
	for(rint i=1;i<=n;++i)
		bdde(l[1][i].l,i,1),bdde(i,l[1][i].l,1);
	dfs(1,-1,0),dfs(n,-1,1);
	build(1,ant,1);
	for(rint i=1;i<=m;++i)
		if(!ch(i))
		{
			int u=id[lca(a[i],n,0)],v=id[lca(b[i],1,1)];
			if(u!=v&&u&&v)
				update(u,v,dis[0][a[i]]+c[i]+dis[1][b[i]],1,ant,1);
		}
	while(t--)
	{
		read(x),read(y);
		if(ch(x))
		{
			ll ans=dis[0][n]-c[x]+y;
			int u=id[lca(a[x],n,0)],v=id[lca(b[x],1,1)];
			if(u!=v&&u&&v)
				ans=min(ans,query(u,v,1,ant,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][a[x]]+y+dis[1][b[x]]));
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define int long long
#define rint register int
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
using namespace std;
typedef pair<int,int>pii;
const int N=200000+10,inf=1e18;
bool vis[N];
int n,m,t,x,y,bnt,cnt,dnt[2];
int a[N],b[N],c[N],id[N],head[N],head2[2][N],pre[2][N],dis[2][N],dep[2][N],p[2][N][20],tr[N<<2];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,w,next;
}e[N<<1],f[2][N<<2];
inline void adde(int u,int v,int w)
{
	e[++cnt]=(node){v,w,head[u]};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++dnt[op]]=(node){v,0,head2[op][u]};
	head2[op][u]=dnt[op];
}
inline void read(int &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int op)
{
	int st=op?n:1;
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline bool ch(int x)
{
	return dis[0][a[x]]+c[x]+dis[1][b[x]]==dis[0][n]&&(pre[0][b[x]]==a[x]||pre[1][a[x]]==b[x]);
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushup(int rt)
{
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
void build(int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=inf;
		return;
	}
	int m=(l+r)>>1;
	build(lson),build(rson);
	pushup(rt);
}
void update(int L,int R,int x,int l,int r,int rt)
{
	if(l==r)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	pushup(rt);
}
int query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1,mn=inf;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
signed main()
{
//	freopen("1.in","r",stdin);
//	freopen("1.out","w",stdout);
	read(n),read(m),read(t);
	memset(pre,-1,sizeof pre);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	for(rint i=1;i<=n;++i)
		dis[0][i]=dis[1][i]=inf;
	dij(0),dij(1);
	for(rint i=1;i<=m;++i)
		if(dis[0][a[i]]>dis[0][b[i]])
			swap(a[i],b[i]);
	for(rint i=1;i<=n;++i)
		bdde(pre[0][i],i,0),bdde(i,pre[0][i],0);
	for(rint i=1;i<=n;++i)
		bdde(pre[1][i],i,1),bdde(i,pre[1][i],1);
	dfs(1,-1,0),dfs(n,-1,1);
	build(1,n,1);
	for(rint i=1;i<=m;++i)
		if(!ch(i))
		{
			x=lca(a[i],n,0),y=lca(b[i],1,1);
			if(x!=y)
				update(x,y,dis[0][a[i]]+c[i]+dis[1][b[i]],1,n,1);
		}
	while(t--)
	{
		read(x),read(y);
		if(ch(x))
		{
			if(y<c[x])
				printf("%lld\n",dis[0][n]-c[x]+y);
			else
				printf("%lld\n",min(dis[0][n]+y-c[x],query(a[x],b[x],1,n,1)));
		}
		else
			if(y<c[x])
				printf("%lld\n",min(dis[0][n],dis[0][a[x]]+y+dis[1][b[x]]));
		else
			printf("%lld\n",dis[0][n]);
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
bool vis[N],lazy[N<<2];
ll y,b[N],dis[2][N],tr[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][20];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<=17;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=17;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=17;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
inline void pushdown(int rt)
{
	lazy[rt<<1]=lazy[rt<<1|1]=1;
	tr[rt<<1]=min(tr[rt<<1],tr[rt]);
	tr[rt<<1|1]=min(tr[rt<<1|1],tr[rt]);
	lazy[rt]=0;
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(L<=l&&r<=R)
	{
		lazy[rt]=1;
		tr[rt]=min(tr[rt],x);
		return;
	}
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	if(lazy[rt])
		pushdown(rt);
	int m=(l+r)>>1;
	ll mn=1e18;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int x=lca(u,n,0),y=lca(v,1,1);
		if(id[x]<id[y])
			update(id[x]+1,id[y],d,1,bnt,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
		{
			ll ans=dis[0][u]+y+dis[1][v];
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,bnt,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][u]+y+dis[1][v]));
	}
	return 0;
}


#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define rint register int
using namespace std;
typedef long long ll;
typedef pair<ll,int>pii;
const int N=200000+10;
bool vis[N];
ll y,b[N],dis[2][N],tr[N<<2];
int n,m,Q,ant[2],bnt,cnt,x;
int head[N],head2[2][N],a[N],c[N],id[N],pre[2][N],dep[2][N],p[2][N][20];
priority_queue<pii,vector<pii>,greater<pii> >q;
struct node
{
	int v,next;
	ll w;
}e[N<<1],f[2][N<<1];
inline void adde(int u,int v,ll w)
{
	e[++cnt]=(node){v,head[u],w};
	head[u]=cnt;
}
inline void bdde(int u,int v,int op)
{
	f[op][++ant[op]]=(node){v,head2[op][u],0};
	head2[op][u]=ant[op];
}
template<class T>inline void read(T &x)
{
	x=0;
	int f=1;
	char s=getchar();
	while(s<'0'||s>'9')
	{
		if(s=='-')
			f=-1;
		s=getchar();
	}
	while(s>='0'&&s<='9')
	{
		x=(x<<1)+(x<<3)+s-'0';
		s=getchar();
	}
	x*=f;
}
inline void dij(int st,int op)
{
	memset(vis,0,sizeof vis);
	q.push(make_pair(dis[op][st]=0,st));
	while(!q.empty())
	{
		int u=q.top().second;
		q.pop();
		if(vis[u])
			continue;
		vis[u]=1;
		for(rint i=head[u];~i;i=e[i].next)
		{
			int v=e[i].v;
			if(dis[op][v]>dis[op][u]+e[i].w)
			{
				pre[op][v]=u;
				dis[op][v]=dis[op][u]+e[i].w;
				q.push(make_pair(dis[op][v],v));
			}
		}
	}
}
void dfs(int u,int fa,int op)
{
	dep[op][u]=dep[op][fa]+1;
	p[op][u][0]=fa;
	for(rint i=1;i<20;++i)
		p[op][u][i]=p[op][p[op][u][i-1]][i-1];
	for(rint i=head2[op][u];~i;i=f[op][i].next)
	{
		int v=f[op][i].v;
		if(v==fa)
			continue;
		dfs(v,u,op);
	}
}
inline int lca(int a,int b,int op)
{
	if(dep[op][a]>dep[op][b])
		swap(a,b);
	for(rint i=19;i>=0;--i)
		if(dep[op][a]<=dep[op][b]-(1<<i))
			b=p[op][b][i];
	if(a==b)
		return a;
	for(rint i=19;i>=0;--i)
		if(p[op][a][i]!=p[op][b][i])
			a=p[op][a][i],b=p[op][b][i];
	return p[op][a][0];
}
void update(int L,int R,ll x,int l,int r,int rt)
{
	if(L<=l&&r<=R)
	{
		tr[rt]=min(tr[rt],x);
		return;
	}
	int m=(l+r)>>1;
	if(L<=m)
		update(L,R,x,lson);
	if(m<R)
		update(L,R,x,rson);
	tr[rt]=min(tr[rt<<1],tr[rt<<1|1]);
}
ll query(int L,int R,int l,int r,int rt)
{
	if(L<=l&&r<=R)
		return tr[rt];
	int m=(l+r)>>1;
	ll mn=1e18;
	if(L<=m)
		mn=query(L,R,lson);
	if(m<R)
		mn=min(mn,query(L,R,rson));
	return mn;
}
int main()
{
	read(n),read(m),read(Q);
	memset(tr,0x3f,sizeof tr);
	memset(dis,0x3f,sizeof dis);
	memset(head,-1,sizeof head);
	memset(head2,-1,sizeof head2);
	for(rint i=1;i<=m;++i)
	{
		read(a[i]),read(b[i]),read(c[i]);
		adde(a[i],b[i],c[i]),adde(b[i],a[i],c[i]);
	}
	dij(1,0),dij(n,1);
	for(rint i=2;i<=n;++i)
		bdde(i,pre[0][i],0),bdde(pre[0][i],i,0);
	for(rint i=1;i<n;++i)
		bdde(i,pre[1][i],1),bdde(pre[1][i],i,1);
	dfs(1,0,0),dfs(n,0,1);
	int x=1;
	while(x!=n)
	{
		id[x]=++bnt;
		x=pre[1][x];
	}
	id[n]=++bnt;
	for(rint i=1;i<=m;++i)
	{
		int u=a[i],v=b[i];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[i]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
			continue;
		int x=lca(u,n,0),y=lca(v,1,1);
		if(id[x]<id[y])
			update(id[x]+1,id[y],d,1,n,1);
	}
	for(rint i=1;i<=Q;++i)
	{
		read(x),read(y);
		int u=a[x],v=b[x];
		if(dis[0][u]>dis[0][v])
			swap(u,v);
		ll d=dis[0][u]+c[x]+dis[1][v];
		if(d==dis[0][n]&&(pre[0][v]==u||pre[1][u]==v))
		{
			ll ans=dis[0][u]+y+dis[1][v];
			if(id[u]<id[v])
				ans=min(ans,query(id[u]+1,id[v],1,n,1));
			printf("%lld\n",ans);
		}
		else
			printf("%lld\n",min(dis[0][n],dis[0][u]+y+dis[1][v]));
	}
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define N 200005
#define inf 1e18
#define getchar nc
using namespace std;
inline char nc(){
    static char buf[100000],*p1=buf,*p2=buf;
    return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
inline ll read()
{
    register ll x=0,f=1;register char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9')x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
    return x*f;
}
inline void write(register int x)
{
    if(!x)putchar('0');if(x<0)x=-x,putchar('-');
    static int sta[20];register int tot=0;
    while(x)sta[tot++]=x%10,x/=10;
    while(tot)putchar(sta[--tot]+48);
}
inline ll Min(register ll a,register ll b)
{
	return a<b?a:b;
}
struct node{
	int pos;
	ll dis;
	inline bool operator<(const node &x)const{
		return x.dis<dis;
	}
};
struct oed{
	int u,v;
	ll len;
}oe[N];
struct edge{
	int id,to,next;
	ll len;
}e[N<<1];
int head[N],cnt;
inline void add(register int id,register int u,register int v,register ll len)
{
	e[++cnt].id=id,e[cnt].to=v,e[cnt].next=head[u],e[cnt].len=len;
	head[u]=cnt;
}
int n,m,q;
int ind[N],lasv[N],l[N],r[N],patl;
bool opa[N];
ll diss[N],dist[N];
priority_queue<node> pq;
inline void dij(register int s,register ll dis[],register int f=0)
{
	for(register 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 u=fa.pos;
		for(register int i=head[u];i;i=e[i].next)
		{
			int v=e[i].to;
			if(dis[v]>fa.dis+e[i].len)
			{
				lasv[v]=e[i].id;
				dis[v]=fa.dis+e[i].len;
				if(f==1&&!opa[v])
					l[v]=l[u];
				if(f==2&&!opa[v])
					r[v]=r[u];
				pq.push((node){v,dis[v]});
			}
		}
	}
}
inline void trace()
{
	opa[1]=1;
	l[1]=r[1]=0;
	int cur=1;
	for(register int i=1;cur!=n;++i)
	{
		int eid=lasv[cur];
		ind[eid]=i;
		++patl;
		cur=oe[eid].u^oe[eid].v^cur;
		opa[cur]=1;
		l[cur]=r[cur]=i;
	}
}
ll tr[N<<3];
inline void build(register int x,register int l,register int r)
{
	tr[x]=inf;
	if(l==r)
		return;
	int mid=l+r>>1;
	build(x<<1,l,mid);
	build(x<<1|1,mid+1,r);
}
inline void modify(register int x,register int l,register int r,register int L,register int R,register ll v)
{
	if(L>R)
		return;
	if(L<=l&&r<=R)
	{
		tr[x]=Min(tr[x],v);
		return;
	}
	int mid=l+r>>1;
	if(L<=mid)
		modify(x<<1,l,mid,L,R,v);
	if(R>mid)
		modify(x<<1|1,mid+1,r,L,R,v);
}
inline ll query(register int x,register int l,register int r,register int pos)
{
	if(l==r)
		return tr[x];
	int mid=l+r>>1;
	ll res=tr[x];
	if(x<=mid)
		res=Min(res,query(x<<1,l,mid,pos));
	else
		res=Min(res,query(x<<1|1,mid+1,r,pos));
	return res;
}
int main()
{
	n=read(),m=read(),q=read();
	for(register int i=1;i<=m;++i)
	{
		oe[i].u=read(),oe[i].v=read(),oe[i].len=read();
		add(i,oe[i].u,oe[i].v,oe[i].len);
		add(i,oe[i].v,oe[i].u,oe[i].len);
		ind[i]=-1;
	}
	dij(n,dist);
	trace();
	dij(1,diss,1);
	dij(n,dist,2);
	build(1,1,patl);
	for(register int i=1;i<=m;++i)
		if(ind[i]==-1)
		{
			modify(1,1,patl,l[oe[i].u]+1,r[oe[i].v],diss[oe[i].u]+oe[i].len+dist[oe[i].v]);
			modify(1,1,patl,l[oe[i].v]+1,r[oe[i].u],diss[oe[i].v]+oe[i].len+dist[oe[i].u]);
		}
	while(q--)
	{
		int eid=read();
		ll newl=read(),ans=diss[n];
		if(ind[eid]!=-1)
		{
			ans=diss[n]-oe[eid].len+newl;
			if(newl>oe[eid].len)
				ans=Min(ans,query(1,1,patl,ind[eid]));
		}
		else if(newl<oe[eid].len)
		{
			ans=Min(ans,diss[oe[eid].u]+newl+dist[oe[eid].v]);
			ans=Min(ans,diss[oe[eid].v]+newl+dist[oe[eid].u]);
		}
		write(ans),puts("");
	}
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define N 200005
#define inf 1e18
#define getchar nc
using namespace std;
inline char nc(){
    static char buf[100000],*p1=buf,*p2=buf;
    return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
inline ll read()
{
    register ll x=0,f=1;register char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9')x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
    return x*f;
}
inline void write(register ll x)
{
    if(!x)putchar('0');if(x<0)x=-x,putchar('-');
    static int sta[20];register int tot=0;
    while(x)sta[tot++]=x%10,x/=10;
    while(tot)putchar(sta[--tot]+48);
}
inline ll Min(register ll a,register ll b)
{
	return a<b?a:b;
}
struct node{
	int pos;
	ll dis;
	inline bool operator<(const node &x)const{
		return x.dis<dis;
	}
};
struct oed{
	int u,v;
	ll len;
}oe[N];
struct edge{
	int id,to,next;
	ll len;
}e[N<<1];
int head[N],cnt;
inline void add(register int id,register int u,register int v,register ll len)
{
	e[++cnt].id=id,e[cnt].to=v,e[cnt].next=head[u],e[cnt].len=len;
	head[u]=cnt;
}
int n,m,q;
int ind[N],lasv[N],l[N],r[N],patl;
bool opa[N];
ll diss[N],dist[N];
priority_queue<node> pq;
inline void dij(register int s,register ll dis[],register int f=0)
{
	for(register 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 u=fa.pos;
		for(register int i=head[u];i;i=e[i].next)
		{
			int v=e[i].to;
			if(dis[v]>fa.dis+e[i].len)
			{
				lasv[v]=e[i].id;
				dis[v]=fa.dis+e[i].len;
				if(f==1&&!opa[v])
					l[v]=l[u];
				if(f==2&&!opa[v])
					r[v]=r[u];
				pq.push((node){v,dis[v]});
			}
		}
	}
}
inline void trace()
{
	opa[1]=1;
	l[1]=r[1]=0;
	int cur=1;
	for(register int i=1;cur!=n;++i)
	{
		int eid=lasv[cur];
		ind[eid]=i;
		++patl;
		cur=oe[eid].u^oe[eid].v^cur;
		opa[cur]=1;
		l[cur]=r[cur]=i;
	}
}
ll tr[N<<3];
inline void build(register int x,register int l,register int r)
{
	tr[x]=inf;
	if(l==r)
		return;
	int mid=l+r>>1;
	build(x<<1,l,mid);
	build(x<<1|1,mid+1,r);
}
inline void modify(register int x,register int l,register int r,register int L,register int R,register ll v)
{
	if(L>R)
		return;
	if(L<=l&&r<=R)
	{
		tr[x]=Min(tr[x],v);
		return;
	}
	int mid=l+r>>1;
	if(L<=mid)
		modify(x<<1,l,mid,L,R,v);
	if(R>mid)
		modify(x<<1|1,mid+1,r,L,R,v);
}
inline ll query(register int x,register int l,register int r,register int pos)
{
	if(l==r)
		return tr[x];
	int mid=l+r>>1;
	ll res=tr[x];
	if(x<=mid)
		res=Min(res,query(x<<1,l,mid,pos));
	else
		res=Min(res,query(x<<1|1,mid+1,r,pos));
	return res;
}
int main()
{
	n=read(),m=read(),q=read();
	for(register int i=1;i<=m;++i)
	{
		oe[i].u=read(),oe[i].v=read(),oe[i].len=read();
		add(i,oe[i].u,oe[i].v,oe[i].len);
		add(i,oe[i].v,oe[i].u,oe[i].len);
		ind[i]=-1;
	}
	dij(n,dist);
	trace();
	dij(1,diss,1);
	dij(n,dist,2);
	build(1,1,patl);
	for(register int i=1;i<=m;++i)
		if(ind[i]==-1)
		{
			modify(1,1,patl,l[oe[i].u]+1,r[oe[i].v],diss[oe[i].u]+oe[i].len+dist[oe[i].v]);
			modify(1,1,patl,l[oe[i].v]+1,r[oe[i].u],diss[oe[i].v]+oe[i].len+dist[oe[i].u]);
		}
	while(q--)
	{
		int eid=read();
		ll newl=read(),ans=diss[n];
		if(ind[eid]!=-1)
		{
			ans=diss[n]-oe[eid].len+newl;
			if(newl>oe[eid].len)
				ans=Min(ans,query(1,1,patl,ind[eid]));
		}
		else if(newl<oe[eid].len)
		{
			ans=Min(ans,diss[oe[eid].u]+newl+dist[oe[eid].v]);
			ans=Min(ans,diss[oe[eid].v]+newl+dist[oe[eid].u]);
		}
		write(ans),puts("");
	}
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define N 200005
#define inf 1e18
#define getchar nc
using namespace std;
inline char nc(){
    static char buf[100000],*p1=buf,*p2=buf;
    return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
inline ll read()
{
    register ll x=0,f=1;register char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9')x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
    return x*f;
}
inline void write(register ll x)
{
    if(!x)putchar('0');if(x<0)x=-x,putchar('-');
    static int sta[20];register int tot=0;
    while(x)sta[tot++]=x%10,x/=10;
    while(tot)putchar(sta[--tot]+48);
}
inline ll Min(register ll a,register ll b)
{
    return a<b?a:b;
}
struct node{
    int pos;
    ll dis;
    inline bool operator<(const node &x)const{
        return x.dis<dis;
    }
};
struct oed{
    int u,v;
    ll len;
}oe[N];
struct edge{
    int id,to,next;
    ll len;
}e[N<<1];
int head[N],cnt;
inline void add(register int id,register int u,register int v,register ll len)
{
    e[++cnt].id=id,e[cnt].to=v,e[cnt].next=head[u],e[cnt].len=len;
    head[u]=cnt;
}
int n,m,q;
int ind[N],lasv[N],l[N],r[N],patl;
bool opa[N];
ll diss[N],dist[N];
priority_queue<node> pq;
inline void dij(register int s,register ll dis[],register int f=0)
{
    for(register 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 u=fa.pos;
        for(register int i=head[u];i;i=e[i].next)
        {
            int v=e[i].to;
            if(dis[v]>fa.dis+e[i].len)
            {
                lasv[v]=e[i].id;
                dis[v]=fa.dis+e[i].len;
                if(f==1&&!opa[v])
                    l[v]=l[u];
                if(f==2&&!opa[v])
                    r[v]=r[u];
                pq.push((node){v,dis[v]});
            }
        }
    }
}
inline void trace()
{
    opa[1]=1;
    l[1]=r[1]=0;
    int cur=1;
    for(register int i=1;cur!=n;++i)
    {
        int eid=lasv[cur];
        ind[eid]=i;
        ++patl;
        cur=oe[eid].u^oe[eid].v^cur;
        opa[cur]=1;
        l[cur]=r[cur]=i;
    }
}
ll tr[N<<3];
inline void build(register int x,register int l,register int r)
{
    tr[x]=inf;
    if(l==r)
        return;
    int mid=l+r>>1;
    build(x<<1,l,mid);
    build(x<<1|1,mid+1,r);
}
inline void modify(register int x,register int l,register int r,register int L,register int R,register ll v)
{
    if(L>R)
        return;
    if(L<=l&&r<=R)
    {
        tr[x]=Min(tr[x],v);
        return;
    }
    int mid=l+r>>1;
    if(L<=mid)
        modify(x<<1,l,mid,L,R,v);
    if(R>mid)
        modify(x<<1|1,mid+1,r,L,R,v);
}
inline ll query(register int x,register int l,register int r,register int pos)
{
    if(l==r)
        return tr[x];
    int mid=l+r>>1;
    ll res=tr[x];
    if(pos<=mid)
        res=Min(res,query(x<<1,l,mid,pos));
    else
        res=Min(res,query(x<<1|1,mid+1,r,pos));
    return res;
}
int main()
{
    n=read(),m=read(),q=read();
    for(register int i=1;i<=m;++i)
    {
        oe[i].u=read(),oe[i].v=read(),oe[i].len=read();
        add(i,oe[i].u,oe[i].v,oe[i].len);
        add(i,oe[i].v,oe[i].u,oe[i].len);
        ind[i]=-1;
    }
    dij(n,dist);
    trace();
    dij(1,diss,1);
    dij(n,dist,2);
    build(1,1,patl);
    for(register int i=1;i<=m;++i)
        if(ind[i]==-1)
        {
            modify(1,1,patl,l[oe[i].u]+1,r[oe[i].v],diss[oe[i].u]+oe[i].len+dist[oe[i].v]);
            modify(1,1,patl,l[oe[i].v]+1,r[oe[i].u],diss[oe[i].v]+oe[i].len+dist[oe[i].u]);
        }
    while(q--)
    {
        int eid=read();
        ll newl=read(),ans=diss[n];
        if(ind[eid]!=-1)
        {
            ans=diss[n]-oe[eid].len+newl;
            if(newl>oe[eid].len)
                ans=Min(ans,query(1,1,patl,ind[eid]));
        }
        else if(newl<oe[eid].len)
        {
            ans=Min(ans,diss[oe[eid].u]+newl+dist[oe[eid].v]);
            ans=Min(ans,diss[oe[eid].v]+newl+dist[oe[eid].u]);
        }
        write(ans),puts("");
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<queue>
#define int long long
using namespace std;
inline int read(){
	int f=1,res=0;char c=getchar();
	while(c<'0'||c>'9') {if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){res=res*10+c-'0',c=getchar();}
	return f*res;
}
const int maxn=2e5+5;
const int inf=1e18;
int head[maxn],cnt=0;
struct Edge{
	int to,ne,w,id;
}e[maxn<<1];
typedef pair<int,int> P;

void add(int id,int u,int v,int w){
	e[++cnt].to=v;
	e[cnt].id=id;
	e[cnt].ne=head[u];
	e[cnt].w=w;
	head[u]=cnt;
}

int n,m,q,eu[maxn],ev[maxn],ew[maxn];
int ind[maxn],dis1[maxn],disn[maxn];
int lastvis[maxn],l[maxn],r[maxn];
bool onpath[maxn];

void dijkstra(int s,int dis[],int flag){
	priority_queue<P,vector<P>,greater<P> >que;
	for(int i=1;i<=n;i++) dis[i]=inf;
	dis[s]=0;
	que.push(P(0,s));
	while(!que.empty()){
		P p=que.top();que.pop();
		int u=p.second;
		if(dis[u]!=p.first) continue;
		for(int i=head[u];i;i=e[i].ne){
			int v=e[i].to;
			if(dis[v]>dis[u]+e[i].w){
				dis[v]=dis[u]+e[i].w;
				lastvis[v]=e[i].id;
				if(flag==1&&!onpath[v]) l[v]=l[u];
				if(flag==2&&!onpath[v]) r[v]=r[u];
				que.push(P(dis[v],v));
			}
		}
	}
}
int pathcnt;

void init(){
	onpath[1]=1;
	l[1]=r[1]=0;
	int u=1;
	for(int i=1;u!=n;i++){
		int edge_id=lastvis[u];
		ind[edge_id]=i;
		pathcnt++;
		u=eu[edge_id]^ev[edge_id]^u;
		onpath[u]=1;
		l[u]=r[u]=i;
	}
}

int t[maxn<<2];
void build(int l,int r,int k){
	t[k]=inf;
	if(l==r) return;
	int mid=l+r>>1;
	build(l,mid,k<<1);
	build(mid+1,r,k<<1|1);
}
void update(int k,int l,int r,int x,int y,int w){
	if(x>y) return;
	if(x<=l&&r<=y){
		t[k]=min(t[k],w);
		return;
	}
	int mid=l+r>>1;
	if(x<=mid) update(k<<1,l,mid,x,y,w);
	if(y>mid) update(k<<1|1,mid+1,r,x,y,w);
}
int query(int k,int l,int r,int pos){
	if(l==r) return t[k];
	int mid=l+r>>1;
	if(pos<=mid) return min(t[k],query(k<<1,l,mid,pos));
	else return min(t[k],query(k<<1|1,mid+1,r,pos));
}
int ed,len,ans;
signed main(){
 	n=read(),m=read(),q=read();
	for(int i=1;i<=m;i++){
		eu[i]=read(),ev[i]=read(),ew[i]=read();
		add(i,eu[i],ev[i],ew[i]);
		add(i,ev[i],eu[i],ew[i]);
		ind[i]=-1;
	}
	dijkstra(n,disn,0);
	init();
	dijkstra(1,dis1,1);
	dijkstra(n,disn,2);
	build(1,pathcnt,1);
	for(int i=1;i<=m;i++){
		if(ind[i]==-1){
			update(1,1,pathcnt,l[eu[i]]+1,r[ev[i]],dis1[eu[i]]+disn[ev[i]]+ew[i]);
			update(1,1,pathcnt,l[ev[i]]+1,r[eu[i]],dis1[ev[i]]+disn[eu[i]]+ew[i]);
		}
	}
//	return 0;
	for(int i=1;i<=q;i++){
		ed=read(),len=read();
		ans=dis1[n];
		if(ind[ed]!=-1){
			ans=ans-ew[ed]+len;
			if(len>ew[ed]) ans=min(ans,query(1,1,pathcnt,ind[ed]));
		}
		else{
			if(len<ew[ed]){
				ans=min(ans,dis1[eu[ed]]+len+disn[ev[ed]]);
				ans=min(ans,dis1[ev[ed]]+len+disn[eu[ed]]);
			}
		}
		printf("%lld\n",ans);
	}
	return 0;
}


/**************************************************************
    Problem: ????
    User: Big_Red_Dates
    Language: GNU_C++11
    Result: Accepted
    Time:0 ms
    Memory:0 kb
    length:0 kb
    score: inf
****************************************************************/
//CLOCKS_PER_SEC
using namespace std;
#include<bitset>
#include<deque>
#include<stdint.h>
#include<set>
#include<stack>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<cstring>
#include<ctime>
#include<map>
#define sqr(x) (x)*(x)
//#define sort stable_sort
#define ll long long
#define mk make_pair
#define pb push_back
#define in insert
#define mtr(x,y,z) mk(mk(x,y),z)
#define fi first
#define se second
#define lch(x) ((x)<<1)
#define rch(x) (((x)<<1)|1)
#define all(x) (x).begin(),(x).end()
#define titose CLOCKS_PER_SEC
#define fpi(x) freopen(x,"r",stdin);
#define fpo(x) freopen(x,"w",stdout);
#define fprio fpi("in.txt");fpo("out.txt");
#define fast ios_base::sync_with_stdio(false);
inline void read(int &x){int v=0,f=1;char c=getchar();while (!isdigit(c)&&c!='-') c=getchar();if (c=='-') f=-1; else v=(c&15);while (isdigit(c=getchar())) v=(v<<1)+(v<<3)+(c&15);x=v*f;}
inline void read(ll &x){ll v=0ll,f=1ll;char c=getchar();while (!isdigit(c)&&c!='-') c=getchar();if (c=='-') f=-1; else v=(c&15);while (isdigit(c=getchar())) v=(v<<1)+(v<<3)+(c&15);x=v*f;}
inline void readc(char &x){char c;while ((c=getchar())==' ');x=c;}
inline void writes(string s){puts(s.c_str());}
inline void writeln(){writes("");}
inline void writei(int x){if (x<0){putchar('-');x=abs(x);}if (!x) putchar('0');char a[25];int top=0;while (x){a[++top]=(x%10)+'0';x/=10;}while (top){putchar(a[top]);top--;}}
inline void writell(ll x){if (x<0){putchar('-');x=abs(x);}if (!x) putchar('0');char a[25];int top=0;while (x){a[++top]=(x%10)+'0';x/=10;}while (top){putchar(a[top]);top--;}}
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define si set<int>
#define sl set<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define msi map<string,int>
#define msl map<string,ll>
#define piii pair<int,pii >
#define piipi pair<pii,int>
#define plll pair<ll,pll >
#define pllpl pair<pll,ll>
#define pqi priority_queue<int>
#define pql priority_queue<ll>
#define npqi priority_queue<int,vector<int>,greater<int> >
#define npql priority_queue<ll,vector<ll>,greater<ll> >
#define forup(i,a,b) for ((i)=(a);(i)<=(b);(i)++)
#define fordo(i,a,b) for ((i)=(a);(i)>=(b);(i)--)
#define rep(i,x) forup ((i),1,(x))
#define repd(i,x) fordo ((i),(x),1)
#define itr iterator
#define fe(itcalc,c) for(__typeof((c).begin()) itcalc=(c).begin();itcalc!=(c).end();itcalc++)
#define NO {cout<<"NO";return 0;}
#define YES {cout<<"YES";return 0;}
#define y0 y000000000000000000000000000
#define y1 y111111111111111111111111111
#define j0 j000000000000000000000000000
#define j1 j111111111111111111111111111
#define cl0(a) memset((a),(0),(sizeof((a))))
#define clz(a) memset((a),(0x16),(sizeof((a))))
#define clf(a) memset((a),(-(0x16)),(sizeof((a))))
#define inf 0x3bbbbbbb
#define lnf 0x1bbbbbbbbbbbbbbbll
#define sqrt divi
#define p2(i) (1ll<<(i))
#define readi read
#define readll read
/*************************************************/
long long n,m,q,i,j,dis1[200005],dis2[200005],px[200005],py[200005],pz[200005],id[200005],l[200005],r[200005],vv[200005];
ll mx[800005],tag[800005];
vector<pair<pair<long long,long long>,ll> > v[200005];
priority_queue<pair<ll,ll> > pq;
long long seq[200005],cnt;

void get_tra(ll x)
{
	l[x]=r[x]=cnt+1;vv[x]=1;
	fe(it,v[x]){
		ll y=it->fi.first,z=it->fi.second+dis1[x]+dis2[y];
		if(z==dis1[n]){
			seq[++cnt]=it->se;
			id[it->se]=cnt;
			get_tra(y);
			return;
		}
	}
}

void upd(ll x,ll y)
{
	tag[x]=min(tag[x],y);
	mx[x]=min(mx[x],y);
}
void pushdo(ll x)
{
	if(tag[x]){
		upd(x+x,tag[x]);
		upd(x+x+1,tag[x]);
		tag[x]=0;
	}
}
void pushup(ll x)
{
	mx[x]=min(mx[x+x],mx[x+x+1]);
}
void update(ll x,ll l,ll r,ll ql,ll qr,ll c)
{
	if(ql>qr)return;
	if(ql<=l&&r<=qr){
		upd(x,c);
		return;
	}
	pushdo(x);
	ll mid=(l+r)/2;
	if(ql<=mid)update(x+x,l,mid,ql,qr,c);
	if(qr>mid)update(x+x+1,mid+1,r,ql,qr,c);
	pushup(x);
}
ll query(ll x,ll l,ll r,ll y)
{
	if(l==r){
		return mx[x];
	}
	pushdo(x);
	ll mid=(l+r)/2;
	if(y<=mid)return query(x+x,l,mid,y);else return query(x+x+1,mid+1,r,y);
}

void dij(ll s,ll *dis1,ll f=0)
{
	long long i;
	rep(i,n)dis1[i]=0x3f3f3f3f3f3f3f3fll;
	dis1[s]=0;pq.push(mk(0,s));
	while(!pq.empty()){
		ll x=pq.top().se,d=-pq.top().fi;pq.pop();
		if(dis1[x]!=d)continue;
		fe(it,v[x]){
			ll y=it->fi.fi,z=it->fi.se+dis1[x];
			if(dis1[y]>z){
				if(f==1&&!vv[y])l[y]=l[x];
				if(f==2&&!vv[y])r[y]=r[x];
				dis1[y]=z;
				pq.push(mk(-z,y));
			}
		}
	}
}

int main()
{
	read(n);read(m);read(q);
	rep(i,m){
		ll x,y,z;
		read(x);read(y);read(z);
		v[x].pb(mk(mk(y,z),i));
		v[y].pb(mk(mk(x,z),i));
		px[i]=x;py[i]=y;pz[i]=z;
	}

	dij(1,dis1);dij(n,dis2);
	get_tra(1);
	dij(1,dis1,1);dij(n,dis2,2);

	memset(tag,0x3f,sizeof(tag));
	memset(mx,0x3f,sizeof(mx));
	rep(i,m){
		if(!id[i]){
			update(1,1,cnt,l[px[i]],r[py[i]]-1,dis1[px[i]]+pz[i]+dis2[py[i]]);
			update(1,1,cnt,l[py[i]],r[px[i]]-1,dis1[py[i]]+pz[i]+dis2[px[i]]);
		}
	}

	while(q--)
	{
		ll x,y;
		read(x);read(y);
		if(!id[x]){
			printf("%I64d\n",min(dis1[n],min(dis1[px[x]]+y+dis2[py[x]],dis1[py[x]]+y+dis2[px[x]])));
		}
		else{
			if(y<pz[x]){
				printf("%I64d\n",dis1[n]-pz[x]+y);
			}
			else{
				printf("%I64d\n",min(dis1[n]-pz[x]+y,query(1,1,cnt,id[x])));
			}
		}
	}
	return 0;
}


/**************************************************************
    Problem: ????
    User: Big_Red_Dates
    Language: GNU_C++11
    Result: Accepted
    Time:0 ms
    Memory:0 kb
    length:0 kb
    score: inf
****************************************************************/
//CLOCKS_PER_SEC
using namespace std;
#include<bitset>
#include<deque>
#include<stdint.h>
#include<set>
#include<stack>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<cstring>
#include<ctime>
#include<map>
#define sqr(x) (x)*(x)
//#define sort stable_sort
#define ll long long
#define mk make_pair
#define pb push_back
#define in insert
#define mtr(x,y,z) mk(mk(x,y),z)
#define fi first
#define se second
#define lch(x) ((x)<<1)
#define rch(x) (((x)<<1)|1)
#define all(x) (x).begin(),(x).end()
#define titose CLOCKS_PER_SEC
#define fpi(x) freopen(x,"r",stdin);
#define fpo(x) freopen(x,"w",stdout);
#define fprio fpi("in.txt");fpo("out.txt");
#define fast ios_base::sync_with_stdio(false);
inline void read(int &x){int v=0,f=1;char c=getchar();while (!isdigit(c)&&c!='-') c=getchar();if (c=='-') f=-1; else v=(c&15);while (isdigit(c=getchar())) v=(v<<1)+(v<<3)+(c&15);x=v*f;}
inline void read(ll &x){ll v=0ll,f=1ll;char c=getchar();while (!isdigit(c)&&c!='-') c=getchar();if (c=='-') f=-1; else v=(c&15);while (isdigit(c=getchar())) v=(v<<1)+(v<<3)+(c&15);x=v*f;}
inline void readc(char &x){char c;while ((c=getchar())==' ');x=c;}
inline void writes(string s){puts(s.c_str());}
inline void writeln(){writes("");}
inline void writei(int x){if (x<0){putchar('-');x=abs(x);}if (!x) putchar('0');char a[25];int top=0;while (x){a[++top]=(x%10)+'0';x/=10;}while (top){putchar(a[top]);top--;}}
inline void writell(ll x){if (x<0){putchar('-');x=abs(x);}if (!x) putchar('0');char a[25];int top=0;while (x){a[++top]=(x%10)+'0';x/=10;}while (top){putchar(a[top]);top--;}}
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define si set<int>
#define sl set<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define msi map<string,int>
#define msl map<string,ll>
#define piii pair<int,pii >
#define piipi pair<pii,int>
#define plll pair<ll,pll >
#define pllpl pair<pll,ll>
#define pqi priority_queue<int>
#define pql priority_queue<ll>
#define npqi priority_queue<int,vector<int>,greater<int> >
#define npql priority_queue<ll,vector<ll>,greater<ll> >
#define forup(i,a,b) for ((i)=(a);(i)<=(b);(i)++)
#define fordo(i,a,b) for ((i)=(a);(i)>=(b);(i)--)
#define rep(i,x) forup ((i),1,(x))
#define repd(i,x) fordo ((i),(x),1)
#define itr iterator
#define fe(itcalc,c) for(__typeof((c).begin()) itcalc=(c).begin();itcalc!=(c).end();itcalc++)
#define NO {cout<<"NO";return 0;}
#define YES {cout<<"YES";return 0;}
#define y0 y000000000000000000000000000
#define y1 y111111111111111111111111111
#define j0 j000000000000000000000000000
#define j1 j111111111111111111111111111
#define cl0(a) memset((a),(0),(sizeof((a))))
#define clz(a) memset((a),(0x16),(sizeof((a))))
#define clf(a) memset((a),(-(0x16)),(sizeof((a))))
#define inf 0x3bbbbbbb
#define lnf 0x1bbbbbbbbbbbbbbbll
#define sqrt divi
#define p2(i) (1ll<<(i))
#define readi read
#define readll read
/*************************************************/
long long n,m,q,i,j,dis1[200005],dis2[200005],px[200005],py[200005],pz[200005],id[200005],l[200005],r[200005],vv[200005];
ll mx[800005],tag[800005];
vector<pair<pair<long long,long long>,ll> > v[200005];
priority_queue<pair<ll,ll> > pq;
long long seq[200005],cnt;

void get_tra(ll x)
{
	l[x]=r[x]=cnt+1;vv[x]=1;
	fe(it,v[x]){
		ll y=it->fi.first,z=it->fi.second+dis1[x]+dis2[y];
		if(z==dis1[n]){
			seq[++cnt]=it->se;
			id[it->se]=cnt;
			get_tra(y);
			return;
		}
	}
}

void upd(ll x,ll y)
{
	tag[x]=min(tag[x],y);
	mx[x]=min(mx[x],y);
}
void pushdo(ll x)
{
	if(tag[x]){
		upd(x+x,tag[x]);
		upd(x+x+1,tag[x]);
		tag[x]=0x3f3f3f3f3f3f3f3fll;
	}
}
void pushup(ll x)
{
	mx[x]=min(mx[x+x],mx[x+x+1]);
}
void update(ll x,ll l,ll r,ll ql,ll qr,ll c)
{
	if(ql>qr)return;
	if(ql<=l&&r<=qr){
		upd(x,c);
		return;
	}
	pushdo(x);
	ll mid=(l+r)/2;
	if(ql<=mid)update(x+x,l,mid,ql,qr,c);
	if(qr>mid)update(x+x+1,mid+1,r,ql,qr,c);
	pushup(x);
}
ll query(ll x,ll l,ll r,ll y)
{
	if(l==r){
		return mx[x];
	}
	pushdo(x);
	ll mid=(l+r)/2;
	if(y<=mid)return query(x+x,l,mid,y);else return query(x+x+1,mid+1,r,y);
}

void dij(ll s,ll *dis1,ll f=0)
{
	long long i;
	rep(i,n)dis1[i]=0x3f3f3f3f3f3f3f3fll;
	dis1[s]=0;pq.push(mk(0,s));
	while(!pq.empty()){
		ll x=pq.top().se,d=-pq.top().fi;pq.pop();
		if(dis1[x]!=d)continue;
		fe(it,v[x]){
			ll y=it->fi.fi,z=it->fi.se+dis1[x];
			if(dis1[y]>z){
				if(f==1&&!vv[y])l[y]=l[x];
				if(f==2&&!vv[y])r[y]=r[x];
				dis1[y]=z;
				pq.push(mk(-z,y));
			}
		}
	}
}

int main()
{
	read(n);read(m);read(q);
	rep(i,m){
		ll x,y,z;
		read(x);read(y);read(z);
		v[x].pb(mk(mk(y,z),i));
		v[y].pb(mk(mk(x,z),i));
		px[i]=x;py[i]=y;pz[i]=z;
	}

	dij(1,dis1);dij(n,dis2);
	get_tra(1);
	dij(1,dis1,1);dij(n,dis2,2);

	memset(tag,0x3f,sizeof(tag));
	memset(mx,0x3f,sizeof(mx));
	rep(i,m){
		if(!id[i]){
			update(1,1,cnt,l[px[i]],r[py[i]]-1,dis1[px[i]]+pz[i]+dis2[py[i]]);
			update(1,1,cnt,l[py[i]],r[px[i]]-1,dis1[py[i]]+pz[i]+dis2[px[i]]);
		}
	}

	while(q--)
	{
		ll x,y;
		read(x);read(y);
		if(!id[x]){
			printf("%I64d\n",min(dis1[n],min(dis1[px[x]]+y+dis2[py[x]],dis1[py[x]]+y+dis2[px[x]])));
		}
		else{
			if(y<pz[x]){
				printf("%I64d\n",dis1[n]-pz[x]+y);
			}
			else{
				printf("%I64d\n",min(dis1[n]-pz[x]+y,query(1,1,cnt,id[x])));
			}
		}
	}
	return 0;
}


/**************************************************************
    Problem: ????
    User: Big_Red_Dates
    Language: GNU_C++11
    Result: Accepted
    Time:0 ms
    Memory:0 kb
    length:0 kb
    score: inf
****************************************************************/
//CLOCKS_PER_SEC
using namespace std;
#include<bitset>
#include<deque>
#include<stdint.h>
#include<set>
#include<stack>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<queue>
#include<cstring>
#include<ctime>
#include<map>
#define sqr(x) (x)*(x)
//#define sort stable_sort
#define ll long long
#define mk make_pair
#define pb push_back
#define in insert
#define mtr(x,y,z) mk(mk(x,y),z)
#define fi first
#define se second
#define lch(x) ((x)<<1)
#define rch(x) (((x)<<1)|1)
#define all(x) (x).begin(),(x).end()
#define titose CLOCKS_PER_SEC
#define fpi(x) freopen(x,"r",stdin);
#define fpo(x) freopen(x,"w",stdout);
#define fprio fpi("in.txt");fpo("out.txt");
#define fast ios_base::sync_with_stdio(false);
inline void read(int &x){int v=0,f=1;char c=getchar();while (!isdigit(c)&&c!='-') c=getchar();if (c=='-') f=-1; else v=(c&15);while (isdigit(c=getchar())) v=(v<<1)+(v<<3)+(c&15);x=v*f;}
inline void read(ll &x){ll v=0ll,f=1ll;char c=getchar();while (!isdigit(c)&&c!='-') c=getchar();if (c=='-') f=-1; else v=(c&15);while (isdigit(c=getchar())) v=(v<<1)+(v<<3)+(c&15);x=v*f;}
inline void readc(char &x){char c;while ((c=getchar())==' ');x=c;}
inline void writes(string s){puts(s.c_str());}
inline void writeln(){writes("");}
inline void writei(int x){if (x<0){putchar('-');x=abs(x);}if (!x) putchar('0');char a[25];int top=0;while (x){a[++top]=(x%10)+'0';x/=10;}while (top){putchar(a[top]);top--;}}
inline void writell(ll x){if (x<0){putchar('-');x=abs(x);}if (!x) putchar('0');char a[25];int top=0;while (x){a[++top]=(x%10)+'0';x/=10;}while (top){putchar(a[top]);top--;}}
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define si set<int>
#define sl set<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define msi map<string,int>
#define msl map<string,ll>
#define piii pair<int,pii >
#define piipi pair<pii,int>
#define plll pair<ll,pll >
#define pllpl pair<pll,ll>
#define pqi priority_queue<int>
#define pql priority_queue<ll>
#define npqi priority_queue<int,vector<int>,greater<int> >
#define npql priority_queue<ll,vector<ll>,greater<ll> >
#define forup(i,a,b) for ((i)=(a);(i)<=(b);(i)++)
#define fordo(i,a,b) for ((i)=(a);(i)>=(b);(i)--)
#define rep(i,x) forup ((i),1,(x))
#define repd(i,x) fordo ((i),(x),1)
#define itr iterator
#define fe(itcalc,c) for(__typeof((c).begin()) itcalc=(c).begin();itcalc!=(c).end();itcalc++)
#define NO {cout<<"NO";return 0;}
#define YES {cout<<"YES";return 0;}
#define y0 y000000000000000000000000000
#define y1 y111111111111111111111111111
#define j0 j000000000000000000000000000
#define j1 j111111111111111111111111111
#define cl0(a) memset((a),(0),(sizeof((a))))
#define clz(a) memset((a),(0x16),(sizeof((a))))
#define clf(a) memset((a),(-(0x16)),(sizeof((a))))
#define inf 0x3bbbbbbb
#define lnf 0x1bbbbbbbbbbbbbbbll
#define sqrt divi
#define p2(i) (1ll<<(i))
#define readi read
#define readll read
/*************************************************/
long long n,m,q,i,j,dis1[200005],dis2[200005],px[200005],py[200005],pz[200005],id[200005],l[200005],r[200005],vv[200005];
ll mx[800005],tag[800005];
vector<pair<pair<long long,long long>,ll> > v[200005];
priority_queue<pair<ll,ll> > pq;
long long seq[200005],cnt;

void get_tra(ll x)
{
	l[x]=r[x]=cnt+1;vv[x]=1;
	fe(it,v[x]){
		ll y=it->fi.first,z=it->fi.second+dis1[x]+dis2[y];
		if(z==dis1[n]){
			seq[++cnt]=it->se;
			id[it->se]=cnt;
			get_tra(y);
			return;
		}
	}
}

void upd(ll x,ll y)
{
	tag[x]=min(tag[x],y);
	mx[x]=min(mx[x],y);
}
void pushdo(ll x)
{
	if(tag[x]){
		upd(x+x,tag[x]);
		upd(x+x+1,tag[x]);
		tag[x]=0;
	}
}
void pushup(ll x)
{
	mx[x]=min(mx[x+x],mx[x+x+1]);
}
void update(ll x,ll l,ll r,ll ql,ll qr,ll c)
{
	if(ql>qr)return;
	if(ql<=l&&r<=qr){
		upd(x,c);
		return;
	}
	pushdo(x);
	ll mid=(l+r)/2;
	if(ql<=mid)update(x+x,l,mid,ql,qr,c);
	if(qr>mid)update(x+x+1,mid+1,r,ql,qr,c);
	pushup(x);
}
ll query(ll x,ll l,ll r,ll y)
{
	if(l==r){
		return mx[x];
	}
	pushdo(x);
	ll mid=(l+r)/2;
	if(y<=mid)return query(x+x,l,mid,y);else return query(x+x+1,mid+1,r,y);
}

void dij(ll s,ll *dis1,ll f=0)
{
	int i;
	rep(i,n)dis1[i]=0x3f3f3f3f3f3f3f3fll;
	dis1[s]=0;pq.push(mk(0,s));
	while(!pq.empty()){
		ll x=pq.top().se,d=-pq.top().fi;pq.pop();
		if(dis1[x]!=d)continue;
		fe(it,v[x]){
			ll y=it->fi.fi,z=it->fi.se+dis1[x];
			if(dis1[y]>z){
				if(f==1&&!vv[y])l[y]=l[x];
				if(f==2&&!vv[y])r[y]=r[x];
				dis1[y]=z;
				pq.push(mk(-z,y));
			}
		}
	}
}

int main()
{
	read(n);read(m);read(q);
	rep(i,m){
		ll x,y,z;
		read(x);read(y);read(z);
		v[x].pb(mk(mk(y,z),i));
		v[y].pb(mk(mk(x,z),i));
		px[i]=x;py[i]=y;pz[i]=z;
	}

	dij(1,dis1);dij(n,dis2);
	get_tra(1);
	dij(1,dis1,1);dij(n,dis2,2);

	memset(tag,0x3f,sizeof(tag));
	memset(mx,0x3f,sizeof(mx));
	rep(i,m){
		if(!id[i]){
			update(1,1,cnt,l[px[i]],r[py[i]]-1,dis1[px[i]]+pz[i]+dis2[py[i]]);
			update(1,1,cnt,l[py[i]],r[px[i]]-1,dis1[py[i]]+pz[i]+dis2[px[i]]);
		}
	}

	while(q--)
	{
		ll x,y;
		read(x);read(y);
		if(!id[x]){
			printf("%I64d\n",min(dis1[n],min(dis1[px[x]]+y+dis2[py[x]],dis1[py[x]]+y+dis2[px[x]])));
		}
		else{
			if(y<pz[x]){
				printf("%I64d\n",dis1[n]-pz[x]+y);
			}
			else{
				printf("%I64d\n",min(dis1[n]-pz[x]+y,query(1,1,n,id[x])));
			}
		}
	}
	return 0;
}


/*
　　　　　／＞　 フ
　　　　　| 　_　 _|
　 　　　／`ミ _x 彡
　　 　 /　　　 　 |
　　　 /　  ヽ　　 ?
　／￣|　　 |　|　|
　| (￣ヽ＿_ヽ_)_)
　＼二つ
 */

#include <queue>
#include <vector>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define MP make_pair
#define ll long long
#define fi first
#define se second
using namespace std;

template <typename T>
void read(T &x) {
    x = 0; bool f = 0;
    char c = getchar();
    for (;!isdigit(c);c=getchar()) if (c=='-') f=1;
    for (;isdigit(c);c=getchar()) x=x*10+(c^48);
    if (f) x=-x;
}

template<typename F>
inline void write(F x, char ed = '\n') {
	static short st[30];short tp=0;
	if(x<0) putchar('-'),x=-x;
	do st[++tp]=x%10,x/=10; while(x);
	while(tp) putchar('0'|st[tp--]);
	putchar(ed);
}

template <typename T>
inline void Mx(T &x, T y) { x < y && (x = y); }

template <typename T>
inline void Mn(T &x, T y) { x > y && (x = y); }

#include <assert.h>
const int N = 400050;
int h[N], ne[N<<1], to[N<<1], w[N<<1], tot = 1, s, t;
inline void add(int x, int y, int z) {
	ne[++tot] = h[x], to[h[x] = tot] = y, w[tot] = z;
	assert(z > 0);
}
inline void adde(int x, int y, int z) { add(x, y, z), add(y, x, z); }
int used[N], st[N], rnum[N], tp;
struct Graph {
	int f[N], vis[N], tag[N], s, t; ll dis[N];
	priority_queue<pair<ll, int> > q;
	void dijistra(bool use) {
		memset(dis, 0x3f, sizeof(dis));
		q.push(MP(0, s)), dis[s] = 0;
		while (q.size()) {
			int x = q.top().se; q.pop();
			if (vis[x]) continue; vis[x] = 1;
			for (int i = h[x]; i; i = ne[i]) {
				int y = to[i];
				if (dis[y] > dis[x] + w[i]) {
					dis[y] = dis[x] + w[i], f[y] = i ^ 1;
					q.push(MP(-dis[y], y));
				}
			}
		}
//		write(dis[t]);
		if (use) return;
		int nw = t;
		for (; nw != s; nw = to[f[nw]])
			used[f[nw] >> 1] = 1, st[++tp] = nw;
		st[++tp] = s;
		reverse(st + 1, st + tp + 1);
		for (int i = 1;i <= tp; i++) rnum[st[i]] = i;
	}
	int ttt;
	void dfs(int x, int t) {
		tag[x] = t;
		for (int i = h[x]; i; i = ne[i]) {
			int y = to[i];
			if (tag[y] || dis[y] != dis[x] + w[i]) continue;
			dfs(y, used[i >> 1] ? y : t);
		}
	}
	int main(int use) {
		ttt = use;
		dijistra(use), dfs(s, s);
		return 0;
	}
}G, rG;

namespace SEG {
	#define ls p << 1
	#define rs ls | 1
	const ll inf = 0x3f3f3f3f3f3f3f3f;
	ll mn[N], ans;
	void build(int p, int l, int r) {
		mn[p] = inf; if (l == r) return ;
		int mid = (l + r) >> 1;
		build(ls, l, mid), build(rs, mid + 1, r);
	}
	void change(int p, int l, int r, int L, int R, ll x) {
		if (L <= l && r <= R) return Mn(mn[p], x);
		int mid = (l + r) >> 1;
		if (L <= mid) change(ls, l, mid, L, R, x);
		if (mid < R) change(rs, mid + 1, r, L, R, x);
	}
	void query(int p, int l, int r, int x, ll &ans) {
		Mn(ans, mn[p]); if (l == r) return;
		int mid = (l + r) >> 1;
		if (x <= mid) query(ls, l, mid, x, ans);
		else query(rs, mid + 1, r, x, ans);
	}
	ll query(int num) {
		ans = inf; query(1, 1, tp - 1, num, ans);
		return ans;
	}
	int main() {
		build(1, 1, tp - 1);
		for (int i = 2;i <= tot; i++) {
			if (used[i >> 1]) continue;
			int x = to[i], y = to[i^1];
			ll t1 = G.dis[x] + w[i] + rG.dis[y];
			x = rnum[G.tag[x]], y = rnum[rG.tag[y]];
//			write(x, ' '), write(y);
			if (x == y || !x) continue;
			if (x > y) swap(x, y);
			change(1, 1, tp - 1, x, y - 1, t1);
		}
		return 0;
	}
}

int n, m, q;
int main() {
//	freopen ("hs.in","r",stdin);
//	freopen ("hs.out","w",stdout);
	read(n), read(m), read(q);
	for (int i = 1, x, y, w;i <= m; i++)
		read(x), read(y), read(w), adde(x, y, w);
	G.s = rG.t = 1, G.t = rG.s = n;
	G.main(0), rG.main(1), SEG::main();
//	return 0;
	while (q--) {
		int nx; ll tw; read(nx), read(tw);
		int x = to[nx << 1], y = to[nx << 1 | 1];
		if (!used[nx]) {
			ll t = min(G.dis[x] + tw + rG.dis[y], rG.dis[x] + tw + G.dis[y]);
			write(min(G.dis[n], t)); continue;
		}
		if (used[nx] && tw < w[nx << 1]) { write(G.dis[n] - w[nx << 1] + tw); continue; }
		write(min(G.dis[n] - w[nx<<1] + tw, SEG::query(min(rnum[x], rnum[y]))));
	}
	return 0;
}