#include <bits/stdc++.h>
using namespace std;
#define nmk ios::sync_with_stdio(5+2==2006); cin.tie(0); cout.tie(0);
#define ll long long
#define maxn 2005
const ll oo=4e18;
vector<pair<int,int>>ke[maxn];
ll d[2][maxn];
struct node{
    ll w;
    int state;
    int v;
    bool operator>(const node& other) const {
        return w > other.w;
    }
};

int main(){
    nmk;
    int n,m,test;cin>>n>>m>>test;
    for (int i=1;i<=m;i++){
        int u,v,t;cin>>u>>v>>t;
        ke[u].push_back({t,v});
    }
    //
    for (int i=1;i<=n;i++){
        d[0][i]=oo;
        d[1][i]=oo;
    }
    d[0][1]=d[1][1]=0;
    //
    priority_queue<node,vector<node>,greater<node>> q;
    q.push({0,0,1});
    while (!q.empty()){
        auto t=q.top();q.pop();
        int u=t.v; ll w=t.w; int state=t.state;
        if (w>d[state][u]) continue;
        for (auto tmp:ke[u]){
            int v=tmp.second, di=tmp.first;

            //ko cat doan uv;
            if (d[state][v]>w+di){
                d[state][v]=w+di;
                q.push({d[state][v],state,v});
            }
            //neu chua cat thi cat thu
            if (state==0){
                if (d[1][v]>w){
                    d[1][v]=w;
                    q.push({d[1][v],1,v});
                }
            }

        }
    }


    while (test--){
        int s,t0;cin>>s>>t0;
        cout<<min(d[0][s],d[1][s]+t0)<<"\n";
    }

    return 0;
}
