Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <random>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define repp(i,n,m) for (int i = m; i < (n); ++i)
#define repl(i,n) for (long long i = 0; i < (n); ++i)
#define reppl(i,n,m) for (long long i = m; i < (n); ++i)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using PL = pair<long long, long long>;
using Pxy = pair<long double, long double>;
using T = tuple<int, int, bool>;
const int INF = 1001001007;
const int MOD = 1000000007;
const ll inf = 1e18;
template <typename AT>
void printvec(vector<AT> &ar){
    rep(i,ar.size()-1) cout << ar[i] << " ";
    cout << ar[ar.size()-1] << endl;
}
template <typename Q>
void printvvec(vector<vector<Q>> &ar){
    rep(i,ar.size()){
        rep(j,ar[0].size()-1) cout << ar[i][j] << " ";
        cout << ar[i][ar[0].size()-1] << endl;
    }
}
template <typename S>
bool range(S a, S b, S x){
    return (a <= x && x < b);
}

struct graph{
    int to, cost, time;
    //constructer
    graph(int to, int cost, int time):to(to),cost(cost),time(time){}
};

struct data{
    int v, cost;
    ll time;
    //constructer
    data(int v, int cost, ll time):v(v),cost(cost),time(time){}
    //define operator "<" about data
    bool operator<(const data& a) const{
        return time > a.time;
    }
};

vector<graph> ar[50];
vector<vector<ll>> dp(50,vector<ll>(2600));

int main() {
    int n, m, s; cin >> n >> m >> s;
    s = min(s,2550);
    rep(i,m){
        int a, b, c, d; cin >> a >> b >> c >> d;
        a--; b--;
        ar[a].emplace_back(b,c,d);
        ar[b].emplace_back(a,c,d);
    }
    rep(i,n)rep(j,2600) dp[i][j] = inf;
    priority_queue<data> pq;
    auto push = [&](int v, int cost, ll time){
        if (cost < 0) return;
        if (dp[v][cost] <= time) return;
        dp[v][cost] = time;
        pq.emplace(v,cost,time);
    };
    vector<int> c(n), d(n);
    rep(i,n) cin >> c[i] >> d[i];
    push(0,s,0);
    while (!pq.empty()){
        data x = pq.top(); pq.pop();
        int v = x.v; int cost = x.cost;
        ll time = x.time;
        if (dp[v][cost] != time) continue;
        {
            int ns = min(cost+c[v], 2550);
            push(v,ns,time+d[v]);
        }
        for (graph y: ar[v]){
            push(y.to, cost-y.cost,time+y.time);
        }
    }
    repp(i,n,1){
        ll ans = inf;
        rep(j,2600) ans = min(ans, dp[i][j]);
        cout << ans << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:24: error: template argument 1 is invalid
   71 |     priority_queue<data> pq;
      |                        ^
a.cc:71:24: error: template argument 2 is invalid
a.cc:71:24: error: template argument 3 is invalid
a.cc: In lambda function:
a.cc:76:12: error: request for member 'emplace' in 'pq', which is of non-class type 'int'
   76 |         pq.emplace(v,cost,time);
      |            ^~~~~~~
a.cc: In function 'int main()':
a.cc:81:16: error: request for member 'empty' in 'pq', which is of non-class type 'int'
   81 |     while (!pq.empty()){
      |                ^~~~~
a.cc:82:9: error: reference to 'data' is ambiguous
   82 |         data x = pq.top(); pq.pop();
      |         ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:47:8: note:                 'struct data'
   47 | struct data{
      |        ^~~~
a.cc:82:31: error: request for member 'pop' in 'pq', which is of non-class type 'int'
   82 |         data x = pq.top(); pq.pop();
      |                               ^~~
a.cc:83:17: error: 'x' was not declared in this scope
   83 |         int v = x.v; int cost = x.cost;
      |                 ^