Language: C++

#include "bits/stdc++.h"
#define REP(i, m, n) for(long long i = m; i < n; ++i)
#define CO(n) cout << n << endl
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

//dijkstraではグラフは隣接リストの形で持つ
//頂点toへのコストcyen,snuukの辺
struct edge {
    ll to, yen, snuuk;
};

ll const inf = 1e10;

//V頂点数，E辺数, s始点, t終点
int V, E, s, t;
//辺
vector<edge> G[100000]; 
//sからの最短yen
ll sy[100000];
//gからの最短snuuk
ll gs[100000];

void Dijkstra(){
    //min_dist, number
    priority_queue<P, vector<P>, greater<P> > que;
    //初期化
    fill(sy,sy+V,inf);
    fill(gs,gs+V,inf);
    //スタート
    sy[s]=0;
    gs[t]=0;
    que.push(P(0,s));
    //更新する点がなくなるまでwhileループ
    while(!que.empty()){
        P p = que.top(); que.pop();
        int v = p.second;
        //入れた時より現在の方が更新されていたらスルー
        if (sy[v] < p.first) continue;
        //vに隣接する辺についてループ
        REP(i,0,G[v].size()){
            edge e = G[v][i];
            //より短いルートが見つかったら更新してqueへ入れる
            if (sy[e.to] > sy[v] + e.yen){
                sy[e.to] = sy[v] + e.yen;
                que.push(P(sy[e.to], e.to));
            }
        }
    }
    que.push(P(0,t));
    //更新する点がなくなるまでwhileループ
    while(!que.empty()){
        P p = que.top(); que.pop();
        int v = p.second;
        //入れた時より現在の方が更新されていたらスルー
        if (gs[v] < p.first) continue;
        //vに隣接する辺についてループ
        REP(i,0,G[v].size()){
            edge e = G[v][i];
            //より短いルートが見つかったら更新してqueへ入れる
            if (gs[e.to] > gs[v] + e.snuuk){
                gs[e.to] = gs[v] + e.snuuk;
                que.push(P(gs[e.to], e.to));
            }
        }
    }
    
    return;
}

int main()
{
    ios::sync_with_stdio(false);
    cin >> V >> E >> s >> t;
    REP(i,0,E){
        ll from, to, yen, snuuk;
        cin >> from >> to >> yen >> snuuk;
        //0スタートにする
        --from; --to;
        edge e;
        e.to = to; e.yen = yen; e.snuuk = snuuk;
        G[from].push_back(e);
        //無向グラフの場合には反対方向に辺を引く
        e.to = from;
        G[to].push_back(e);
    }
    //0スタートにする
    --s; --t;
    Dijkstra();
    // REP(i,0,V) CO(sy[i]);
    // REP(i,0,V) CO(gs[i]);
    ll answer[100000]; fill(answer, answer + V, inf);
    answer[V-1] = max(0, 1e15 - sy[V-1] - gs[V-1]);
    for (int i = V-2; i >=0; --i){
        answer[i] = max(answer[i+1], (ll)(1e15 - sy[i] - gs[i]));
    }
    REP(i,0,V) CO(answer[i]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:94:22: error: no matching function for call to 'max(int, double)'
   94 |     answer[V-1] = max(0, 1e15 - sy[V-1] - gs[V-1]);
      |                   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:94:22: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'double')
   94 |     answer[V-1] = max(0, 1e15 - sy[V-1] - gs[V-1]);
      |                   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:94:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   94 |     answer[V-1] = max(0, 1e15 - sy[V-1] - gs[V-1]);
      |                   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~