Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mod1 1000000007
#define ff first
#define ss second
#define INF 1e9
#define INFLL 1e18
typedef long long int ll;
// #define intLL unsigned long long int//used when x<2^64-1 && x>0
#define int long long//used when x<2^63-1
int fact[200005];
int power(int a, int b)
{
    int res=1;
    while(b)
    {
        if(b&1)
        {
            res*=a;
            res%=mod1;
        }
        a*=a;
        a%=mod1;
        b/=2;
    }
    return res;
}
int add(int a, int b)
{
    return (0LL+a+b)%mod1;
}
int sub(int a, int b)
{
    return add(a, mod1-b);
}
int mul(int a, int b)
{
    return (1LL*a*b)%mod1;
}
int inv(int x)
{
    return power(x, mod1-2);
}
int nCr(int n, int r)
{
    return mul(fact[n], inv(mul(fact[r], fact[n-r])));
}
int cmp(const pair<int, int> &a, const pair<int, int> &b)
{
    return (a.ff>b.ff);
}
int32_t main()
{

    IOS;
    int n, m, s;
    cin>>n>>m>>s;
    vector<pair<int, pair<int,int>>> gr[55];//{v, {cost, time}}
    for(int i=0;i<m;i++)
    {
        int u, v, a, b;
        cin>>u>>v>>a>>b;
        u--, v--;
        gr[u].pb({v, {a, b}});
        gr[v].pb({u, {a, b}});
    }
    int c[n+1], d[n+1];
    for(int i=0;i<n;i++)
    {
        cin>>c[i]>>d[i];
        c[i]=max(c[i], 2500);
    }
    s=min(s, 2500LL);
    int dp[n+1][2501];
    for(int i=0;i<n;i++)
        for(int j=0;j<2501;j++)
            dp[i][j]=INFLL;
    dp[0][s]=0;//dp[i][j] means reached at vertex i with j coins left
    for(int lol=0;lol<n+1;lol++)
    {
        for(int i=0;i<n;i++)
        {
            for(auto it: gr[i])
            {
                for(int j=0;j<=2500;j++)
                {
                    if(j-it.ss.ff>=0)
                    {
                        dp[i][j-it.ss.ff]=min(dp[i][j-it.ss.ff], dp[it.ff][j]+it.ss.ss);
                    }
                }
            }
            for(int j=0;j<=2500;j++)
            {
                if(j-c[i]>=0)
                    dp[i][j]=min(dp[i][j], dp[i][j-c[i]]+d[i]);
            }
        }
    }
    for(int i=1;i<n;i++)
    {
        int ans=INFLL;
        for(int j=0;j<=2500;j++)
            ans=min(ans, dp[i][j]);
        cout<<ans<<"\n";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:73:17: error: no matching function for call to 'max(long long int&, int)'
   73 |         c[i]=max(c[i], 2500);
      |              ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:73:17: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   73 |         c[i]=max(c[i], 2500);
      |              ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:73:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   73 |         c[i]=max(c[i], 2500);
      |              ~~~^~~~~~~~~~~~