Language: C++

int n, m, s, t;
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;


int vis[101010];
void dijkstra(int s, vector<vector<pair<int, int>>> &E, vector<ll> &D) {
	REP(i, n) D[i] = INFL;
	REP(i, n) vis[i] = 0;

	min_priority_queue<pair<ll, int>> que;

	D[s] = 0;
	que.push({ 0, s });

	while (!que.empty()) {
		auto q = que.top();
		que.pop();

		ll cst = q.first;
		int cu = q.second;

		if (vis[cu]) continue;
		vis[cu] = 1;

		fore(p, E[cu]) {
			ll cst2 = cst + p.second;
			int to = p.first;

			if (chmin(D[to], cst2)) que.push({ D[to], to });
		}
	}
}



int main() {
	
	
	cin >> n >> m >> s >> t;
	s--; t--;

	vector<vector<pair<int, int>>> c(n), d(n);

	VLL da(n), db(n);

	REP(i, m) {
		int u, v, a, b;
		cin >> u >> v >> a >> b;
		u--; v--;

		c[u].push_back({ v,a });
		c[v].push_back({ u,a });
		d[u].push_back({ v,b });
		d[v].push_back({ u,b });
	}

	dijkstra(s, c, da);
	dijkstra(t, d, db);

	VLL ans(n);

	REP(i, n)ans[i] = da[i] + db[i];

	for (int i = n - 2; i >= 0; i--) {
		chmin(ans[i], ans[i + 1]);
	}
	

	REP(i, n)cout << 1000000000000000 - ans[i] << endl;


	return 0;
}


Compiler output:
a.cc:2:49: error: 'priority_queue' does not name a type
    2 | template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
      |                                                 ^~~~~~~~~~~~~~
a.cc:6:22: error: 'vector' has not been declared
    6 | void dijkstra(int s, vector<vector<pair<int, int>>> &E, vector<ll> &D) {
      |                      ^~~~~~
a.cc:6:28: error: expected ',' or '...' before '<' token
    6 | void dijkstra(int s, vector<vector<pair<int, int>>> &E, vector<ll> &D) {
      |                            ^
a.cc: In function 'void dijkstra(int, int)':
a.cc:7:13: error: 'i' was not declared in this scope
    7 |         REP(i, n) D[i] = INFL;
      |             ^
a.cc:7:9: error: 'REP' was not declared in this scope
    7 |         REP(i, n) D[i] = INFL;
      |         ^~~
a.cc:10:9: error: 'min_priority_queue' was not declared in this scope
   10 |         min_priority_queue<pair<ll, int>> que;
      |         ^~~~~~~~~~~~~~~~~~
a.cc:10:28: error: 'pair' was not declared in this scope
   10 |         min_priority_queue<pair<ll, int>> que;
      |                            ^~~~
a.cc:10:33: error: 'll' was not declared in this scope
   10 |         min_priority_queue<pair<ll, int>> que;
      |                                 ^~
a.cc:10:37: error: expected primary-expression before 'int'
   10 |         min_priority_queue<pair<ll, int>> que;
      |                                     ^~~
a.cc:12:9: error: 'D' was not declared in this scope
   12 |         D[s] = 0;
      |         ^
a.cc:13:9: error: 'que' was not declared in this scope
   13 |         que.push({ 0, s });
      |         ^~~
a.cc:19:19: error: expected ';' before 'cst'
   19 |                 ll cst = q.first;
      |                   ^~~~
      |                   ;
a.cc:25:22: error: 'p' was not declared in this scope
   25 |                 fore(p, E[cu]) {
      |                      ^
a.cc:25:25: error: 'E' was not declared in this scope
   25 |                 fore(p, E[cu]) {
      |                         ^
a.cc:25:17: error: 'fore' was not declared in this scope
   25 |                 fore(p, E[cu]) {
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:39:9: error: 'cin' was not declared in this scope
   39 |         cin >> n >> m >> s >> t;
      |         ^~~
a.cc:42:9: error: 'vector' was not declared in this scope
   42 |         vector<vector<pair<int, int>>> c(n), d(n);
      |         ^~~~~~
a.cc:42:23: error: 'pair' was not declared in this scope
   42 |         vector<vector<pair<int, int>>> c(n), d(n);
      |                       ^~~~
a.cc:42:28: error: expected primary-expression before 'int'
   42 |         vector<vector<pair<int, int>>> c(n), d(n);
      |                            ^~~
a.cc:44:9: error: 'VLL' was not declared in this scope
   44 |         VLL da(n), db(n);
      |         ^~~
a.cc:46:13: error: 'i' was not declared in this scope
   46 |         REP(i, m) {
      |             ^
a.cc:46:9: error: 'REP' was not declared in this scope
   46 |         REP(i, m) {
      |         ^~~
a.cc:57:21: error: 'c' was not declared in this scope
   57 |         dijkstra(s, c, da);
      |                     ^
a.cc:57:24: error: 'da' was not declared in this scope
   57 |         dijkstra(s, c, da);
      |                        ^~
a.cc:58:21: error: 'd' was not declared in this scope
   58 |         dijkstra(t, d, db);
      |                     ^
a.cc:58:24: error: 'db' was not declared in this scope
   58 |         dijkstra(t, d, db);
      |                        ^~
a.cc:60:12: error: expected ';' before 'ans'
   60 |         VLL ans(n);
      |            ^~~~
      |            ;
a.cc:65:23: error: 'ans' was not declared in this scope
   65 |                 chmin(ans[i], ans[i + 1]);
      |                       ^~~
a.cc:65:17: error: 'chmin' was not declared in this scope
   65 |                 chmin(ans[i], ans[i + 1]);
      |                 ^~~~~