Language: C++

#include<bits/stdc++.h>
#include<queue>
using namespace std;
typedef long long ll;
typedef pair<ll, int> P;
int main () {
  int N, M, s, t;
  cin >> N >> M >> s >> t;
  s --;
  t --;
  vector<vector<int>>tow(N);
  vector<vector<ll>>yen(N);
  vector<vector<ll>>snu(N);
  for (int i = 0; i < M; i ++) {
    int u, v, a, b;
    u --;
    v --;
    tow[u].push_back(v);
    tow[v].push_back(u);
    yen[u].push_back(a);
    yen[v].push_back(a);
    snu[u].push_back(b);
    snu[v].push_back(b);
  }
  priority_queue<P, vector<P>, greater<P>>Y;
  priority_queue<P, vector<P>, greater<P>>S;
  Y.push(0ll, s);
  S.push(0ll, t);
  vector<ll>ay(N);
  vector<ll>sy(N);
  ay[s] = 0ll;
  sy[t] = 0ll;
  while (!Y.empty()) {
    int u;
    ll d;
    tie(d, u) = Y.top();
    Y.pop();
    if (d > ay[u]) continue;
    for (int i = 0; i < (int)tow[u].size(); i ++) {
      int v = tow[u][i];
      if (ay[v] > d + yen[u][i]) {
        ay[v] = d + yen[u][i];
        Y.push(ay[v], v);
      }
    }
  }
  while (!S.empty()) {
    int u;
    ll d;
    tie(d, u) = S.top();
    S.pop();
    if (d > sy[u]) continue;
    for (int i = 0; i < (int)tow[u].size(); i ++) {
      int v = tow[u][i];
      if (sy[v] > d + snu[u][i]) {
        sy[v] = d + snu[u][i];
        S.push(sy[v], v);
      }
    }
  }
  vector<ll>ans(N);
  ll inf = 1e15;
  for (int i = 0; i < N; i ++) {
    if (i == N - 1) ans[i] = inf - ay[i] - sy[i];
    else {
      ans[i] = max(ans[i + 1], inf - ay[i] - sy[i]);
    }
  }
  for (int i = 0; i < N; i ++) cout << ans[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: no matching function for call to 'std::priority_queue<std::pair<long long int, int>, std::vector<std::pair<long long int, int> >, std::greater<std::pair<long long int, int> > >::push(long long int, int&)'
   27 |   Y.push(0ll, s);
      |   ~~~~~~^~~~~~~~
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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int> >; _Compare = std::greater<std::pair<long long int, int> >; value_type = std::pair<long long int, int>]'
  736 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:736:7: note:   candidate expects 1 argument, 2 provided
/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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int> >; _Compare = std::greater<std::pair<long long int, int> >; value_type = std::pair<long long int, int>]'
  744 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:744:7: note:   candidate expects 1 argument, 2 provided
a.cc:28:9: error: no matching function for call to 'std::priority_queue<std::pair<long long int, int>, std::vector<std::pair<long long int, int> >, std::greater<std::pair<long long int, int> > >::push(long long int, int&)'
   28 |   S.push(0ll, t);
      |   ~~~~~~^~~~~~~~
/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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int> >; _Compare = std::greater<std::pair<long long int, int> >; value_type = std::pair<long long int, int>]'
  736 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:736:7: note:   candidate expects 1 argument, 2 provided
/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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int> >; _Compare = std::greater<std::pair<long long int, int> >; value_type = std::pair<long long int, int>]'
  744 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:744:7: note:   candidate expects 1 argument, 2 provided
a.cc:43:15: error: no matching function for call to 'std::priority_queue<std::pair<long long int, int>, std::vector<std::pair<long long int, int> >, std::greater<std::pair<long long int, int> > >::push(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, int&)'
   43 |         Y.push(ay[v], v);
      |         ~~~~~~^~~~~~~~~~
/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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int> >; _Compare = std::greater<std::pair<long long int, int> >; value_type = std::pair<long long int, int>]'
  736 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:736:7: note:   candidate expects 1 argument, 2 provided
/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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int> >; _Compare = std::greater<std::pair<long long int, int> >; value_type = std::pair<long long int, int>]'
  744 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:744:7: note:   candidate expects 1 argument, 2 provided
a.cc:57:15: error: no matching function for call to 'std::priority_queue<std::pair<long long int, int>, std::vector<std::pair<long long int, int> >, std::greater<std::pair<long long int, int> > >::push(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&, int&)'
   57 |         S.push(sy[v], v);
      |         ~~~~~~^~~~~~~~~~
/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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int> >; _Compare = std::greater<std::pair<long long int, int> >; value_type = std::pair<long long int, int>]'
  736 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:736:7: note:   candidate expects 1 argument, 2 provided
/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<long long int, int>; _Sequence = std::vector<std::pair<long long int, int> >; _Compare = std::greater<std::pair<long long int, int> >; value_type = std::pair<long long int, int>]'
  744 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/14/bits/stl_queue.h:744:7: note:   candidate expects 1 argument, 2 provided