Language: C++

#include <bits/stdc++.h>
using namespace std;
int n, m, l;
int V;
  
int vv(int v, int mon)
{
    return v * (l + 1) + mon;
}
  
vector<int> dijkstra(int s, vector<vector<pair<int, int>>> &edge)
{
    const int INF = 1e9;
    vector<int> d(V, INF);
    d[s] = 0;
    priority_queue<pair<int, int>> que; //cost v
    que.push(make_pair(0, s));
    while (!que.empty())
    {
        auto st = que.top();
        que.pop();
        int v = st.second;
        int cost = st.first;
        if (d[v] < cost)
            continue;
        for (int i = 0; i < edge[v].size(); i++)
        {
            int to = edge[v][i].second;
            if (cost + edge[v][i].first < d[to])
            {
                d[to] = cost + edge[v][i].first;
                que.push(make_pair([to], to));
            }
        }
    }
    return d;
}
  
int main()
{
    while (true)
    {
        cin >> n >> m >> l;
        if (n == 0)
            break;
        V = n * (l + 1);
        vector<vector<pair<int, int>>> edge(V); //cost,to
        for (int i = 0; i < m; i++)
        {
            int a, b, d, e;
            cin >> a >> b >> d >> e;
            a--, b--;
            for (int j = 0; j <= l; j++)
            {
                edge[vv(a, j)].push_back(make_pair(e, vv(b, j)));
                edge[vv(b, j)].push_back(make_pair(e, vv(a, j)));
                if (j - d >= 0)
                {
                    edge[vv(a, j)].push_back(make_pair(0, vv(b, j - d)));
                    edge[vv(b, j)].push_back(make_pair(0, vv(a, j - d)));
                }
            }
        }
        vector<int> d = dijkstra(vv(0, l), edge);
        int res = 1e9;
  
        for (int i = 0; i <= l; i++)
        {
            int val=d[vv(n-1,i)];
              
            res = min(res,val);
        }
  
        cout << res << endl;
    }
    return 0;
}

Compiler output:
a.cc: In lambda function:
a.cc:32:40: error: expected '{' before ',' token
   32 |                 que.push(make_pair([to], to));
      |                                        ^
a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)':
a.cc:32:25: error: no matching function for call to 'std::priority_queue<std::pair<int, int> >::push(std::pair<dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)::<lambda()>, int>)'
   32 |                 que.push(make_pair([to], to));
      |                 ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/queue:66,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:157,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_queue.h:736:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::less<std::pair<int, int> >; value_type = std::pair<int, int>]'
  736 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:736:30: note:   no known conversion for argument 1 from 'std::pair<dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)::<lambda()>, int>' to 'const std::priority_queue<std::pair<int, int> >::value_type&' {aka 'const std::pair<int, int>&'}
  736 |       push(const value_type& __x)
      |            ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_queue.h:744:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::less<std::pair<int, int> >; value_type = std::pair<int, int>]'
  744 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:744:25: note:   no known conversion for argument 1 from 'std::pair<dijkstra(int, std::vector<std::vector<std::pair<int, int> > >&)::<lambda()>, int>' to 'std::priority_queue<std::pair<int, int> >::value_type&&' {aka 'std::pair<int, int>&&'}
  744 |       push(value_type&& __x)
      |            ~~~~~~~~~~~~~^~~