Language: C++

#include <iostream>
#include <queue>
#include <vector>
#include <functional>
#include <algorithm>
using namespace std;

const int MAX_N = 100000;
const int MAX_M = 100000;
const long long FIRST_YEN = 1000000000000000;

void dijkstra(int n, vector<pair<int, int>> G[MAX_N + 1], int start, long long dist[MAX_N + 1]);

int main() {
    int n, m, s, t, u[MAX_M], v[MAX_M], a[MAX_M], b[MAX_M];
    cin >> n >> m >> s >> t;
    for (int i = 0; i < m; i++) cin >> u[i] >> v[i] >> a[i] >> b[i];

    vector<pair<int, long long>> yen[MAX_N + 1], snuuk[MAX_N + 1];
    for (int i = 0; i < m; i++) {
        yen[u[i]].push_back(make_pair(v[i], a[i]));
        yen[v[i]].push_back(make_pair(u[i], a[i]));
        snuuk[u[i]].push_back(make_pair(v[i], b[i]));
        snuuk[v[i]].push_back(make_pair(u[i], b[i]));
    }

    long long dist_s2i[MAX_N + 1];
    long long dist_i2t[MAX_N + 1];
    dijkstra(n, yen, s, dist_s2i);
    dijkstra(n, snuuk, t, dist_i2t);

    pair<long long, int> dist_s2t[MAX_N + 1];
    for (int i = 1; i <= n; i++) {
        dist_s2t[i] = make_pair(dist_s2i[i] + dist_i2t[i], i);
    }
    sort(dist_s2t + 1, dist_s2t + n + 1);

    long long max_snuuk[MAX_N];
    int ms_i = 0;
    int d_i = 1;
    while (ms_i < n) {
        bool hoge = false;
        for (int i = ms_i; i < dist_s2t[d_i].second; i++) {
            max_snuuk[i] = FIRST_YEN - dist_s2t[d_i].first;
            hoge = true;
        }
        if (hoge) ms_i = dist_s2t[d_i].second;
        d_i++;
    }

    for (int i = 0; i < n; i++) {
        cout << max_snuuk[i] << endl;
    }
    return 0;
}

void dijkstra(int n, vector<pair<int, int>> G[MAX_N + 1], int start, long long dist[MAX_N + 1]) {
    // initialize distance
    for (int i = 1; i <= n; i++) dist[i] = FIRST_YEN;

    priority_queue<pair<long long, int>, vector<pair<long long, int>>, greater<pair<long long, int>>> Q;
    Q.push(make_pair(0, start));
    dist[start] = 0;
    while (!Q.empty()) {
        int pos = Q.top().second; Q.pop();
        for (int i = 0; i < G[pos].size(); i++) {
            int to = G[pos][i].first, cost = G[pos][i].second;
            if (dist[to] > dist[pos] + cost) {
                dist[to] = dist[pos] + cost;
                Q.push(make_pair(dist[to], to));
            }
        }
    }

    return;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: cannot convert 'std::vector<std::pair<int, long long int> >*' to 'std::vector<std::pair<int, int> >*'
   29 |     dijkstra(n, yen, s, dist_s2i);
      |                 ^~~
      |                 |
      |                 std::vector<std::pair<int, long long int> >*
a.cc:12:45: note:   initializing argument 2 of 'void dijkstra(int, std::vector<std::pair<int, int> >*, int, long long int*)'
   12 | void dijkstra(int n, vector<pair<int, int>> G[MAX_N + 1], int start, long long dist[MAX_N + 1]);
      |                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
a.cc:30:17: error: cannot convert 'std::vector<std::pair<int, long long int> >*' to 'std::vector<std::pair<int, int> >*'
   30 |     dijkstra(n, snuuk, t, dist_i2t);
      |                 ^~~~~
      |                 |
      |                 std::vector<std::pair<int, long long int> >*
a.cc:12:45: note:   initializing argument 2 of 'void dijkstra(int, std::vector<std::pair<int, int> >*, int, long long int*)'
   12 | void dijkstra(int n, vector<pair<int, int>> G[MAX_N + 1], int start, long long dist[MAX_N + 1]);
      |                      ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~