Language: C++

#include<bits/stdc++.h>
#include<queue>
using namespace std;
int main () {
  int n, m, s, t;
  cin >> n >> m >> s >> t;
  vector<queue<int>>snu(N);
  vector<queue<int>>yen(N);
  vector<int>si(N, 0);
  vector<queue<long long>>cost_s(N);
  vector<queue<long long>>cost_y(N);
  for (int i = 0; i < m; i ++) {
    int u, v;
    long long a, b;
    cin >> u >> v >> a >> b;
    v --;
    u --;
    snu[u].push(v);
    snu[v].push(u);
    yen[u].push(v);
    yen[v].push(u);
    cost_s.push(b);
    cost_y.push(a);
    si[u] ++;
    si[v] ++;
  }
  vector<long long>di_s(N, 1e16);
  vector<long long>di_y(N, 1e16);
  auto c_s = [](int a, int b) { return di_s[a] > di_s[b]};
  auto c_y = [](int a, int b) { return di_y[a] > di_y[b]};
  di_y[s] = 0;
  di_s[t] = 0;
  priority_queue<int, vector<int>, decltype(c_s)>q_s(c_s);
  priority_queue<int, vector<int>, decltype(c_y)>q_s(c_y);
  for (int i = 0; i < n; i ++) {
    q_s.push(i);
    q_y.push(i);
  }
  while (!q_s.empty()) {
    int u = q_s.top();
    for (int i = 0; i < si[u]; i ++) {
      int v = snu[u].front();
      snu[u].pop();
      snu[u].push(v);
      long long c = cost_s[u].front();
      cost_s[u].pop();
      cost_s[u].push(c);
      if (di_s[v] > di_s[u] + c) di_s[v] = di_s[u] + c;
    }
    q_s.pop();
  }
  while (!q_y.empty()) {
    int u = q_y.top();
    for (int i = 0; i < si[u]; i ++) {
      int v = yen[u].front();
      yen[u].pop();
      yen[u].push(v);
      long long c = cost_s[u].front();
      cost_y[u].pop();
      cost_y[u].push(c);
      if (di_y[v] > di_y[u] + c) di_y[v] = di_y[u] + c;
    }
    q_y.pop();
  }
  long long ans[100003];
  ans[N] = 1e16;
  for (int i = N - 1; i >= 0; i --) {
    ans[i] = min(ans[i + 1], di_s[i] + di_y[i]);
  }
  for (int i = 0; i < N; i ++) {
    cout << 1e15 - ans[i] << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: 'N' was not declared in this scope
    7 |   vector<queue<int>>snu(N);
      |                         ^
a.cc:22:12: error: 'class std::vector<std::queue<long long int> >' has no member named 'push'
   22 |     cost_s.push(b);
      |            ^~~~
a.cc:23:12: error: 'class std::vector<std::queue<long long int> >' has no member named 'push'
   23 |     cost_y.push(a);
      |            ^~~~
a.cc: In lambda function:
a.cc:29:40: error: 'di_s' is not captured
   29 |   auto c_s = [](int a, int b) { return di_s[a] > di_s[b]};
      |                                        ^~~~
a.cc:29:15: note: the lambda has no capture-default
   29 |   auto c_s = [](int a, int b) { return di_s[a] > di_s[b]};
      |               ^
a.cc:27:20: note: 'std::vector<long long int> di_s' declared here
   27 |   vector<long long>di_s(N, 1e16);
      |                    ^~~~
a.cc:29:50: error: 'di_s' is not captured
   29 |   auto c_s = [](int a, int b) { return di_s[a] > di_s[b]};
      |                                                  ^~~~
a.cc:29:15: note: the lambda has no capture-default
   29 |   auto c_s = [](int a, int b) { return di_s[a] > di_s[b]};
      |               ^
a.cc:27:20: note: 'std::vector<long long int> di_s' declared here
   27 |   vector<long long>di_s(N, 1e16);
      |                    ^~~~
a.cc:29:57: error: expected ';' before '}' token
   29 |   auto c_s = [](int a, int b) { return di_s[a] > di_s[b]};
      |                                                         ^
      |                                                         ;
a.cc: In lambda function:
a.cc:30:40: error: 'di_y' is not captured
   30 |   auto c_y = [](int a, int b) { return di_y[a] > di_y[b]};
      |                                        ^~~~
a.cc:30:15: note: the lambda has no capture-default
   30 |   auto c_y = [](int a, int b) { return di_y[a] > di_y[b]};
      |               ^
a.cc:28:20: note: 'std::vector<long long int> di_y' declared here
   28 |   vector<long long>di_y(N, 1e16);
      |                    ^~~~
a.cc:30:50: error: 'di_y' is not captured
   30 |   auto c_y = [](int a, int b) { return di_y[a] > di_y[b]};
      |                                                  ^~~~
a.cc:30:15: note: the lambda has no capture-default
   30 |   auto c_y = [](int a, int b) { return di_y[a] > di_y[b]};
      |               ^
a.cc:28:20: note: 'std::vector<long long int> di_y' declared here
   28 |   vector<long long>di_y(N, 1e16);
      |                    ^~~~
a.cc:30:57: error: expected ';' before '}' token
   30 |   auto c_y = [](int a, int b) { return di_y[a] > di_y[b]};
      |                                                         ^
      |                                                         ;
a.cc: In function 'int main()':
a.cc:34:50: error: conflicting declaration 'std::priority_queue<int, std::vector<int>, main()::<lambda(int, int)> > q_s'
   34 |   priority_queue<int, vector<int>, decltype(c_y)>q_s(c_y);
      |                                                  ^~~
a.cc:33:50: note: previous declaration as 'std::priority_queue<int, std::vector<int>, main()::<lambda(int, int)> > q_s'
   33 |   priority_queue<int, vector<int>, decltype(c_s)>q_s(c_s);
      |                                                  ^~~
a.cc:37:5: error: 'q_y' was not declared in this scope; did you mean 'q_s'?
   37 |     q_y.push(i);
      |     ^~~
      |     q_s
a.cc:52:11: error: 'q_y' was not declared in this scope; did you mean 'q_s'?
   52 |   while (!q_y.empty()) {
      |           ^~~
      |           q_s
a.cc:72:4: error: expected '}' at end of input
   72 |   }
      |    ^
a.cc:4:13: note: to match this '{'
    4 | int main () {
      |             ^