Language: C++

/*#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<tuple>*/
#include<bits/stdc++.h>
using namespace std;
struct edge{ll to,cost,time,rev;};
using Graph =vector<vector<edge>>;
#define p make_pair
#define INF 1000000000007
#define get(a,b) get<a>(b)
using ll=long long;
#define t make_tuple

void add_edge(ll from,ll to, ll cost ,ll time ,Graph &graph)
{
    graph[from].push_back((edge){to,cost,time,(ll)graph[to].size()});
    graph[from].push_back((edge){from,cost,time,(ll)graph[from].size()-1});
}

void dijkstra(ll s,ll S,Graph graph,vector<pair<ll,ll>> change,vector<pair<ll,ll>> &dis)
{
    ll n=graph.size();
    for (ll i=0;i<n;i++) dis[i]=p(INF,0); //1はかかる時間,２は所持銀貨数
    vector<pair<ll,ll>> prev(n,p(-1,-1));
    dis[s].second=S;
    dis[s].first=0;
    prev[s]=p(s,-1);
    priority_queue<tuple<ll,ll,ll>,vector<tuple<ll,ll,ll>>,greater<tuple<ll,ll,ll>> > que;
    que.push(t(dis[s].first,dis[s].second,s));
    ll v,from,to,ginka,m;
    while (!que.empty())
    {
        v=get(2,que.top());
        que.pop();
        for (ll i=0;i<graph[v].size();i++)
        {
            edge &e=graph[v][i];
            if (dis[e.to].first>dis[v].first+e.time)
            {
                if (dis[v].second>=e.cost)
                {
                    dis[e.to].first=dis[v].first+e.time;
                    dis[e.to].second=dis[v].second-e.cost;
                    prev[e.to]=p(v,i);
                    que.push(t(dis[e.to].first,dis[e.to].second,e.to));
                }
                else
                {
                    from=-1;to=v;m=INF;
                    while(from!=s)
                    {
                        from=prev[to].first;
                        if (m>((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second)
                        {
                            m=((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second;
                            ginka=dis[v].second+((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].first;
                        }
                        to=from;
                    }
                    if (m>((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second)
                        {
                            m=((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second;
                            ginka=dis[v].second+((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].first;
                        }
                    if (dis[e.to].first>dis[v].first+e.time+m)
                    {
                        dis[e.to].first=dis[v].first+e.time+m;
                        dis[e.to].second=ginka-e.cost;
                        prev[e.to]=p(v,i);
                        que.push(make_tuple(dis[e.to].first,dis[e.to].second,e.to));
                    }  
                }
            }
        }
    }
}



int main()
{
    ll N,M,S;cin >> N >> M >> S;
    ll u,v,a,b;
    Graph graph(N,vector<edge> ());
    vector<vector<pair<ll,ll>>> graph2(N,vector<pair<ll,ll>> (N,p(INF,INF)));
    vector<pair<ll,ll>> dis(N);
    vector<pair<ll,ll>> change(N);
    for (ll i=0;i<M;i++)
    {
        cin >> u >> v >> a >> b;
        u--;v--;
        graph2[u][v]=p(a,b);
        graph2[v][u]=p(a,b);
    }
    for (ll i=0;i<N;i++) graph2[i][i]=p(0,0);
    for (ll k=0;k<N;k++)
    {
        for (ll i=0;i<N;i++)
        {
            for (ll j=0;j<N;j++)
            {
                if (graph2[i][j].second>=graph2[i][k].second+graph2[k][j].second)
                {
                    graph2[i][j].first=graph2[i][k].first+graph2[k][j].first;
                    graph2[i][j].second=graph2[i][k].second+graph2[k][j].second;
                }
            }
        }
    }
    for (ll i=0;i<N;i++)
    {
        for (ll j=i+1;j<N;j++)
        {
            add_edge(i,j,graph2[i][j].first,graph2[i][j].second,graph);
        }
    }
    for (ll i=0;i<N;i++)
    {
        cin >> a >>b;
        change[i]=p(a,b); 
    }
    dijkstra(0,S,graph,change,dis);
    for (ll i=1;i<N;i++) cout << dis[i].first << endl;
    return 0;
    
}

Compiler output:
a.cc:8:13: error: 'll' does not name a type
    8 | struct edge{ll to,cost,time,rev;};
      |             ^~
a.cc: In function 'void add_edge(ll, ll, ll, ll, Graph&)':
a.cc:18:67: error: too many initializers for 'edge'
   18 |     graph[from].push_back((edge){to,cost,time,(ll)graph[to].size()});
      |                                                                   ^
a.cc:19:73: error: too many initializers for 'edge'
   19 |     graph[from].push_back((edge){from,cost,time,(ll)graph[from].size()-1});
      |                                                                         ^
a.cc: In function 'void dijkstra(ll, ll, Graph, std::vector<std::pair<long long int, long long int> >, std::vector<std::pair<long long int, long long int> >&)':
a.cc:40:23: error: 'struct edge' has no member named 'to'
   40 |             if (dis[e.to].first>dis[v].first+e.time)
      |                       ^~
a.cc:40:48: error: 'struct edge' has no member named 'time'
   40 |             if (dis[e.to].first>dis[v].first+e.time)
      |                                                ^~~~
a.cc:42:38: error: 'struct edge' has no member named 'cost'
   42 |                 if (dis[v].second>=e.cost)
      |                                      ^~~~
a.cc:44:27: error: 'struct edge' has no member named 'to'
   44 |                     dis[e.to].first=dis[v].first+e.time;
      |                           ^~
a.cc:44:52: error: 'struct edge' has no member named 'time'
   44 |                     dis[e.to].first=dis[v].first+e.time;
      |                                                    ^~~~
a.cc:45:27: error: 'struct edge' has no member named 'to'
   45 |                     dis[e.to].second=dis[v].second-e.cost;
      |                           ^~
a.cc:45:54: error: 'struct edge' has no member named 'cost'
   45 |                     dis[e.to].second=dis[v].second-e.cost;
      |                                                      ^~~~
a.cc:46:28: error: 'struct edge' has no member named 'to'
   46 |                     prev[e.to]=p(v,i);
      |                            ^~
a.cc:47:38: error: 'struct edge' has no member named 'to'
   47 |                     que.push(t(dis[e.to].first,dis[e.to].second,e.to));
      |                                      ^~
a.cc:47:54: error: 'struct edge' has no member named 'to'
   47 |                     que.push(t(dis[e.to].first,dis[e.to].second,e.to));
      |                                                      ^~
a.cc:47:67: error: 'struct edge' has no member named 'to'
   47 |                     que.push(t(dis[e.to].first,dis[e.to].second,e.to));
      |                                                                   ^~
a.cc:55:35: error: 'struct edge' has no member named 'cost'
   55 |                         if (m>((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second)
      |                                   ^~~~
a.cc:55:76: error: 'struct edge' has no member named 'cost'
   55 |                         if (m>((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second)
      |                                                                            ^~~~
a.cc:57:35: error: 'struct edge' has no member named 'cost'
   57 |                             m=((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second;
      |                                   ^~~~
a.cc:57:76: error: 'struct edge' has no member named 'cost'
   57 |                             m=((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second;
      |                                                                            ^~~~
a.cc:58:53: error: 'struct edge' has no member named 'cost'
   58 |                             ginka=dis[v].second+((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].first;
      |                                                     ^~~~
a.cc:58:94: error: 'struct edge' has no member named 'cost'
   58 |                             ginka=dis[v].second+((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].first;
      |                                                                                              ^~~~
a.cc:62:31: error: 'struct edge' has no member named 'cost'
   62 |                     if (m>((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second)
      |                               ^~~~
a.cc:62:72: error: 'struct edge' has no member named 'cost'
   62 |                     if (m>((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second)
      |                                                                        ^~~~
a.cc:64:35: error: 'struct edge' has no member named 'cost'
   64 |                             m=((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second;
      |                                   ^~~~
a.cc:64:76: error: 'struct edge' has no member named 'cost'
   64 |                             m=((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].second;
      |                                                                            ^~~~
a.cc:65:53: error: 'struct edge' has no member named 'cost'
   65 |                             ginka=dis[v].second+((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].first;
      |                                                     ^~~~
a.cc:65:94: error: 'struct edge' has no member named 'cost'
   65 |                             ginka=dis[v].second+((e.cost-dis[v].second)/change[to].first+((e.cost-dis[v].second)%change[to].first==0?0:1))*change[to].first;
      |                                                                                              ^~~~
a.cc:67:31: error: 'struct edge' has no member named 'to'
   67 |                     if (dis[e.to].first>dis[v].first+e.time+m)
      |                               ^~
a.cc:67:56: error: 'struct edge' has no member named 'time'
   67 |                     if (dis[e.to].first>dis[v].first+e.time+m)
      |                                                        ^~~~
a.cc:69:31: error: 'struct edge' has no member named 'to'
   69 |                         dis[e.to].first=dis[v].first+e.time+m;
      |                               ^~
a.cc:69:56: error: 'struct edge' has no member named 'time'
   69 |                         dis[e.to].first=dis[v].first+e.time+m;
      |                                                        ^~~~
a.cc:70:31: error: 'struct edge' has no member named 'to'
   70 |                         dis[e.to].second=ginka-e.cost;
      |                               ^~
a.cc:70:50: error: 'struct edge' has no member named 'cost'
   70 |                         dis[e.to].second=ginka-e.cost;
      |                                                  ^~~~
a.cc:71:32: error: 'struct edge' has no member named 'to'
   71 |                         prev[e.to]=p(v,i);
      |                                ^~
a.cc:72:51: error: 'struct edge' has no member named 'to'
   72 |                         que.push(make_tuple(dis[e.to].first,dis[e.to].second,e.to));
      |                                                   ^~
a.cc:72:67: error: 'struct edge' has no member named 'to'
   72 |                         que.push(make_tuple(dis[e.to].first,dis[e.to].second,e.to));
      |                                                                   ^~
a.cc:72:80: error: 'struct edge' has no member named 'to'
   72 |                         que.push(make_tuple(dis[e.to].first,dis[e.to].second,e.to));
      |                                                                                ^~