criyle/codenet-compile-errors huggingface dataset:
Language: C++

// -----------------------------------
// Author     : MatsuTaku
// Affiliation: Tokushima University
// Country    : Japan
// Date       : 04/03/2020
// -----------------------------------

#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);

  int n,m,s,t; cin>>n>>m>>s>>t;
  s--; t--;
  struct Train {
    int t;
    ll a,b;
    Train(int t=0, ll a=0, ll b=0) : t(t),a(a),b(b){}
  };
  vector<Train> graph[n];
  for (int i = 0; i < m; i++) {
    int u,v,a,b; cin>>u>>v>>a>>b;
    u--; v--;
    graph[u].emplace_back(v,a,b);
    graph[v].emplace_back(u,a,b);
  }
  
  auto set_dist = [&](auto s, bool yen, auto& arr) {
    arr.assign(arr.size(), 1e17);
    queue<pair<int, ll>> qs;
    arr[s] = 0;
    qs.emplace(s, 0);
    while (not qs.empty()) {
      auto q = qs.front(); qs.pop();
      auto p = q.first;
      auto c = q.second;
      if (arr[p] < c)
        continue;
      for (auto t : graph[p]) {
        auto cost = c+(yen?t.a:t.b);
        if (arr[t.t] < cost)
          continue;
        arr[t.t] = cost;
        qs.emplace(t.t, cost);
      }
    }
  };
  
  vector<ll> yen(n), snook(n);
  set_dist(s, true, yen);
  set_dist(t, false, snook);
  
  vector<ll> ans(n);
  for (int i = n-1; i >= 0; i--) {
    ans[i] = min(ans[i+1], yen[i]+snook[i]);
  }
  for (auto a : ans)
    cout << a << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:19: error: use of deleted function 'main()::<lambda(auto:28, bool, auto:29&)>::~<lambda>()'
   31 |   auto set_dist = [&](auto s, bool yen, auto& arr) {
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   32 |     arr.assign(arr.size(), 1e17);
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   33 |     queue<pair<int, ll>> qs;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~
   34 |     arr[s] = 0;
      |     ~~~~~~~~~~~    
   35 |     qs.emplace(s, 0);
      |     ~~~~~~~~~~~~~~~~~
   36 |     while (not qs.empty()) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       auto q = qs.front(); qs.pop();
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   38 |       auto p = q.first;
      |       ~~~~~~~~~~~~~~~~~
   39 |       auto c = q.second;
      |       ~~~~~~~~~~~~~~~~~~
   40 |       if (arr[p] < c)
      |       ~~~~~~~~~~~~~~~
   41 |         continue;
      |         ~~~~~~~~~  
   42 |       for (auto t : graph[p]) {
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~
   43 |         auto cost = c+(yen?t.a:t.b);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   44 |         if (arr[t.t] < cost)
      |         ~~~~~~~~~~~~~~~~~~~~
   45 |           continue;
      |           ~~~~~~~~~
   46 |         arr[t.t] = cost;
      |         ~~~~~~~~~~~~~~~~
   47 |         qs.emplace(t.t, cost);
      |         ~~~~~~~~~~~~~~~~~~~~~~
   48 |       }
      |       ~            
   49 |     }
      |     ~              
   50 |   };
      |   ~                
a.cc:31:21: note: 'main()::<lambda(auto:28, bool, auto:29&)>::~<lambda>()' is implicitly deleted because the default definition would be ill-formed:
   31 |   auto set_dist = [&](auto s, bool yen, auto& arr) {
      |                     ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<queue>
#include<stack>
using namespace std;
#define INF (1 << 30) - 1
#define LINF 1LL << 60
const int MOD = 1000000007;
using ll = long long;
using P = pair<int, ll>;

struct Edge{
	int to;
	ll a, b;
	Edge(int to, ll a, ll b) : to(to), a(a), b(b){}
};

vector<vector<Edge>> g;
int n, m, s, t;

auto cmp = [](P a, P b){
	return a.second < b.second;
};

vector<ll> dijkstra(int start, int flg){
	vector<ll> dist(n, LINF);
  	priority_queue<P, vector<P>, decltype(cmp)> que(cmp);
  	dist[start] = 0;
  	que.push({start, dist[start]});
	
  	while(!que.empty()){
  		auto v = que.top();
  		que.pop();
  		int from = v.first;
  		ll d = d.second;
  		if(d > dist[from])continue;

  		for(auto nv : g[from]){
  			int cost = (flg ? nv.a : nv.b);
  			if(dist[from] + cost < dist[nv.to]){
  				dist[nv.to] = dist[from] + cost;
  				que.push({nv.to, dist[nv.to]});
  			}
  		}
  	}

  	return dist;
}

int main(){
  cin >> n >> m >> s >> t;
  --s;
  --t;
  g.resize(n);
  for(int i = 0; i < m; ++i){
  	int u, v;
  	ll a, b;
  	cin >> u >> v >> a >> b;
  	--u;
  	--v;
  	g[u].push_back(Edge(v, a, b));
  	g[v].push_back(Edge(u, a, b));
  }

  vector<ll> dist_s = dijkstra(s, 1);
  vector<ll> dist_t = dijkstra(t, 0); 
  vector<ll> ans(n + 1, LINF); 
  for(int i = n - 1; i >= 0; --i){
  	ans[i] = min(ans[i + 1], dist_s[i] + dist_t[i]);
  }

  ll p_money = 1e15;
  for(int i = 0; i < n; ++i){
  	cout << p_money - ans[i] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'std::vector<long long int> dijkstra(int, int)':
a.cc:39:26: error: request for member 'second' in 'd', which is of non-class type 'll' {aka 'long long int'}
   39 |                 ll d = d.second;
      |                          ^~~~~~
Language: C++

//#include <tourist>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <string>
#include <iomanip>
#include <limits>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <list>
#include <queue>
#include <tuple>
#include <deque>
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <utility>
#include <complex>
#include <functional>
using namespace std;
const int MOD = 1000000007;
typedef long long ll;
const int INF = (1 << 28);
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
//setprecision(15)有効数字15桁
//-std=c++14
//LLONG_MAX
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b)
{
    return a * b / gcd(a, b);
}
int n, m, s, t;
//ダイクストラ
struct edge{ll to, cost;};
typedef pair<ll,ll> P;
struct graph{
  ll V;
  vector<vector<edge> > G;
  vector<ll> d;
//vector<vector<int> > prev((int)G.size()); // prev[v] := v から復元できる辺たち
  graph(ll n){
    init(n);
  }

  void init(ll n){
    V = n;
    G.resize(V);
    d.resize(V);
    REP(i,V){
      d[i] = INF;
    }
  }

  void add_edge(ll s, ll t, ll cost){
    edge e;
    e.to = t, e.cost = cost;
    G[s].push_back(e);
  }

  void dijkstra(ll s){
    REP(i,V){
      d[i] = INF;
    }
    d[s] = 0;
    priority_queue<P,vector<P>, greater<P> > que;
    que.push(P(0,s));
    while(!que.empty()){
      P p = que.top(); que.pop();
      ll v = p.second;
      if(d[v]<p.first) continue;
      for(auto e : G[v]){
        if(d[e.to]>d[v]+e.cost){
          d[e.to] = d[v]+e.cost;
          que.push(P(d[e.to],e.to));
          // 復元のための
          //prev[e.first].clear();
          //prev[e.first].push_back(v);
        }
      }
    }
  }
};

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n>>m>>s>>t;
    graph gs(n);
    graph gt(n);
    s--;
    t--;
    for (int i = 0; i < m; i++)
    {
        ll u, v, a, b;
        cin >> u>>v>>a>>b;
        u--;
        v--;
        gs.add_edge(u,v,a);
        gs.add_edge(v,u,a);
        gt.add_edge(u,v,b);
        gt.add_edge(v,u,b);
    }
    vector<ll> le;
    ll ans=1000000000000000;
    gs.dijkstra(s);
    gt.dijkstra(t);
    ll ansm=LLONG_MAX;
    for(int i=n-1;i>=0;i--){
        ansm=min(ansm,gs.d[i]+gt.d[i]);
        le.push_back(ansm);
    }
    for(int i=n-1;i>=0;i--){
        cout<<ans-le[i]<<"\n";
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:123:13: error: 'LLONG_MAX' was not declared in this scope
  123 |     ll ansm=LLONG_MAX;
      |             ^~~~~~~~~
a.cc:24:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   23 | #include <functional>
  +++ |+#include <climits>
   24 | using namespace std;
Language: C++

#include "stdafx.h"
#include <iostream>
#include <set>
#include <queue>
#include <vector>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <string>
#include <cstring>
#include <climits>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
#include <tuple>
#include <numeric>
#include <assert.h>
#include <functional>
#include <unordered_map>

using namespace std;

/*-----------------------------------------------------------------------------
　定義
 -------------------------------------------------------------------------------*/
#define REP(i, n)				for (int (i) = 0 ; (i) < (int)(n) ; ++(i))
#define REPN(i, m, n)			for (int (i) = m ; (i) < (int)(n) ; ++(i))
#define INF						2e9
#define MOD						(1000 * 1000 * 1000 + 7)
#define Ceil(x, n)				(((((x))+((n)-1))/n))		/* Nの倍数に切り上げ割り算 */
#define CeilN(x, n)				(((((x))+((n)-1))/n)*n)		/* Nの倍数に切り上げ */
#define FloorN(x, n)			((x)-(x)%(n))				/* Nの倍数に切り下げ */
#define IsOdd(x)				(((x)&0x01UL) == 0x01UL)			
#define IsEven(x)				(!IsOdd((x)))						
#define	BitSetV(Val,Bit)		((Val) |= (Bit))			
#define	BitTstV(Val,Bit)		((Val) & (Bit))				
#define ArrayLength(x)			(sizeof( x ) / sizeof( x[ 0 ]))
#define	MAX_QWORD				((QWORD)0xFFFFFFFFFFFFFFFF)
#define M_PI					3.14159265358979323846
typedef long long				ll;
typedef unsigned long long int	QWORD;
typedef pair<ll, ll>			P;

/*-----------------------------------------------------------------------------
　処理
 -------------------------------------------------------------------------------*/
// 枝定義
struct Edge
{
	int	to;
	ll	dist;
	Edge(){}
	Edge(int to, ll dist): to(to), dist(dist){}
};

// グラフ定義(二次元配列)
template <class E>
using Graph = vector<vector<E>>;
 
// ダイクストラ
template<class D, D infVal>
struct Dijkstra 
{
	// res[i] = sからiまでの最短距離
	vector<D> res;
    
	template<class E>
	Dijkstra(const Graph<E> &G, int s) 
	{
		int V = (int)G.size();
		res = vector<D>(V, infVal);
        
		using P = pair<D, int>;
		priority_queue<P, vector<P>, greater<P>> que;
		que.push(P(0, s));
		res[s] = 0;
        
		while (!que.empty()) {
			P p = que.top(); que.pop();
			
			// 違う最短距離がキューにあるのでスキップ
			if (res[p.second] < p.first) {
				continue;
			}

			// 最短距離を更新
			for (E edge : G[p.second]) {
				D nextDist = p.first + edge.dist;
                if (nextDist < res[edge.to]) {
					res[edge.to] = nextDist;
					que.push(P(nextDist, edge.to));
				}
			}
		}
	}
};


int main()
{
	int n, m, s, t;
	cin >> n >> m >> s >> t;
	
	Graph<Edge>	G(n);
	REP(i, m) {
		int u, v, a, b;
		cin >> u >> b >> a >> b;
		u--, v--;
		G[a].emplace_back(Edge(b, c));
		Gr[b].emplace_back(Edge(a, c));
	}

	Dijkstra<ll, (ll)2e18> res(G, 0);
	Dijkstra<ll, (ll)2e18> resR(Gr, 0);

	ll ans = 0;
	REP(i, N) {
		ll resTime = T - res.res[i] - resR.res[i];
		if (0 < resTime) {
			ans = max(ans, resTime * A[i]);
		}
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
#define MOD 1000000007
#define INF (1 << 30)
#define REP(i, m, n) for(int i = (int)m; i < (int)n; ++i)
#define rep(i, n) REP(i, 0, n)

typedef vector<vector<P> > Graph;
vector<int> dijkstra(int s, Graph &G){
    priority_queue<P, vector<P>, greater<P> > que;
    int n = G.size();
    vector<int> dist(n);
    dist.assign(n, INF);
    dist[s] = 0;
    que.push(P(0, s));

    while(!que.empty()) {
        P p = que.top();
        que.pop();
        int v = p.second;
        rep(i,G[v].size()) {
            if(dist[G[v][i].first] > dist[v]+G[v][i].second){
                dist[G[v][i].first] = dist[v]+G[v][i].second;
                que.push(P(dist[G[v][i].first],G[v][i].first));
            }
        }
    }
    return dist;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n, m, s, t; cin >> n >> m >> s >> t;
    Graph A(n), B(n);
    rep(i, m) {
        ll u, v, a, b; cin >> u >> v >> a >> b;
        u--, v--;
        A[u].push_back(P(v, a));
        A[v].push_back(P(u, a));
        B[u].push_back(P(v, b));
        B[v].push_back(P(u, b));
    }
    vector<int> dstA = dijkstra(s, A);
    vector<int> dstB = dijkstra(t, B);
    vector<ll> ans(n);
    ans[0] = dstA[0]+dstB[0];
    REP(i, 1, n) ans[i] = min(ans[i-1]+, (ll)(dstA[i]+dstB[i]));
    rep(i, n) cout << (ll)(1e15 - ans[i]) << '\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:40: error: expected primary-expression before ',' token
   52 |     REP(i, 1, n) ans[i] = min(ans[i-1]+, (ll)(dstA[i]+dstB[i]));
      |                                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

template<typename T>
struct Dijkstra {
	struct Edge {
		const int from;
		const int to;
		const T cost;
		Edge(const int from, const int to, const T cost) :
			from(from),
			to(to),
			cost(cost)
			{}
	};
	const int V;
	vector<vector<Edge>> G;
	int start;
	const T INF = numeric_limits<T>::max();
	vector<T> dist;
	vector<int> rec;
	Dijkstra(const int V) :
		V(V),
		G(vector<vector<Edge>>(V, vector<Edge>()))
		{}
	void addEdge(const int from, const int to, const T cost) {
		assert(cost >= 0);
		G[from].emplace_back(from, to, cost);
	}
	void build(const int start) {
		(*this).start = start;
		dist = vector<T>(V, INF);
		rec = vector<int>(V, -1);
		priority_queue<pair<T, int>, vector<pair<T, int>>, greater<pair<T, int>>> que;
		dist[start] = 0;
		que.push({0, start});
		while(que.size()) {
			T cost;
			int from;
			tie(cost, from) = que.top();
			que.pop();
			for(Edge e : G[from]) {
				if(dist[e.from] + e.cost < dist[e.to]) {
					dist[e.to] = dist[e.from] + e.cost;
					rec[e.to] = e.from;
					que.push({dist[e.to], e.to});
				}
			}
		}
	}
	T distance(const int to) {
		if(dist[to] == INF) throw "INVALID";
		return dist[to];
	}
	vector<int> route(int to) {
		distance(to);
		vector<int> ret;
		while(to != start) {
			ret.push_back(to);
			to = rec[to];
		}
		ret.push_back(start);
		reverse(ret.begin(), ret.end());
		return ret;
	}
};

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <iomanip>
#include <cassert>
#include <random>
#include <tuple>

using namespace std;
typedef long long ll;
typedef pair<ll, int> P;

int n, m, s, t;

const ll INF = 1e18;
const ll MAX = 1e15;

struct edge{int to; ll cost;};

ll dist_s[100100];
ll dist_t[100100];
vector<edge> g_money[100100];
vector<edge> g_snuke[100100];

void dijkstra_s(int v) {
    priority_queue<P, vector<P>, greater<P> > pq;
    fill(dist_s, dist_s + n, INF);
    dist_s[v] = 0;
    pq.push(P (0, v));

    while (!pq.empty()) {
        p = pq.top(); pq.pop();
        ll dist = p.first;
        int node = p.second;
        if (dist_s[node] < dist) continue;
        for (auto e: g_money[node]) {
            if (dist_s[e.to] > dist + e.cost) {
                dist_s[e.to] = dist + e.cost;
                pq.push(P (dist + e.cost, e.to));
            }
        }
    }
}

void dijkstra_t(int v) {
    priority_queue<P, vector<P>, greater<P> > pq;
    fill(dist_s, dist_s + n, INF);
    dist_t[v] = 0;
    pq.push(P(0, v));

    while (!pq.empty()) {
        p = pq.top(); pq.pop();
        ll dist = p.first;
        int node = p.second;
        if (dist_t[node] < dist) continue;
        for (auto e: g_snuke[node]) {
            if (dist_t[e.to] > dist + e.cost) {
                dist_t[e.to] = dist + e.cost;
                pq.push(P (dist + e.cost, e.to));
            }
        }
    }
}

int main() {
    cin >> n >> m >> s >> t;
    s--; t--;
    for (int i = 0; i < m; i++) {
        int u, v;
        ll a, b;
        cin >> u >> v >> a >> b;
        u--; v--;
        g_money[u].push_back({v, a});
        g_money[v].push_back({u, a});
        g_snuke[u].push_back({v, b});
        g_snuke[v].push_back({u, b});
    }

    dijkstra_s(s);
    dijkstra_t(t);
    
    priority_queue<P, vector<P>, greater<P> > q;
    for (int i = 0; i < n; i++) {
        ll sum = dist_s[i] + dist_t[i];
        q.push(P(sum, i));
    }

    for (int i = 0; i < n; i++) {
        P p = q.top();
        ll pay = p.first;
        int index = p.second;
        while (index < i) {
            q.pop();
            P p = q.top();
            pay = p.first;
            index = p.second;
        }
        cout << MAX - pay << endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'void dijkstra_s(int)':
a.cc:38:9: error: 'p' was not declared in this scope
   38 |         p = pq.top(); pq.pop();
      |         ^
a.cc: In function 'void dijkstra_t(int)':
a.cc:58:9: error: 'p' was not declared in this scope
   58 |         p = pq.top(); pq.pop();
      |         ^
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <iomanip>
#include <cassert>
#include <random>
#include <tuple>

using namespace std;
typedef long long ll;
typedef pair<ll, int> P;

const ll INF = 1e18;
const ll MAX = 1e15;

struct edge{int to; ll cost;};

ll dist_s[100100];
ll dist_t[100100];
vector<edge> g_money[100100];
vector<edge> g_snuke[100100];

void dijkstra_s(int v) {
    priority_queue<P, vector<P>, greater<P> > pq;
    dist_s[v] = 0;
    pq.push(P (0, v));

    while (!pq.empty()) {
        p = pq.top(); pq.pop();
        ll dist = p.first;
        int node = p.second;
        if (dist_s[node] < dist) continue;
        for (auto e: g_money[node]) {
            if (dist_s[e.to] > dist + e.cost) {
                dist_s[e.to] = dist + e.cost;
                pq.push(P (dist + e.cost, e.to));
            }
        }
    }
}

void dijkstra_t(int v) {
    priority_queue<P, vector<P>, greater<P> > pq;
    dist_t[v] = 0;
    pq.push(P (0, v));

    while (!pq.empty()) {
        p = pq.top(); pq.pop();
        ll dist = p.first;
        int node = p.second;
        if (dist_t[node] < dist) continue;
        for (auto e: g_snuke[node]) {
            if (dist_t[e.to] > dist + e.cost) {
                dist_t[e.to] = dist + e.cost;
                pq.push(P (dist + e.cost, e.to));
            }
        }
    }
}

int main() {
    int n, m, s, t;
    cin >> n >> m >> s >> t;
    s--; t--;
    for (int i = 0; i < m; i++) {
        int u, v;
        ll a, b;
        cin >> u >> v >> a >> b;
        u--; v--;
        g_money[u].push_back({v, a});
        g_money[v].push_back({u, a});
        g_snuke[u].push_back({v, b});
        g_snuke[v].push_back({u, b});
    }

    dijkstra_s(s);
    dijkstra_t(t);


    priority_queue<P, vector<P>, greater<P> > pq;
    for (int i = 0; i < n; i++) {
        ll sum = dist_s[i] + dist_t[i];
        pq.push(P (sum, i));
    }

    for (int i = 0; i < n; i++) {
        P p = pq.top();
        ll pay = p.first;
        int index = p.second;
        while (index < i) {
            pq.pop();
            P p = pq.top();
            pay = p.first;
            index = p.second;
        }
        cout << MAX - pay << endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'void dijkstra_s(int)':
a.cc:35:9: error: 'p' was not declared in this scope
   35 |         p = pq.top(); pq.pop();
      |         ^
a.cc: In function 'void dijkstra_t(int)':
a.cc:54:9: error: 'p' was not declared in this scope
   54 |         p = pq.top(); pq.pop();
      |         ^
Language: C++


void dijkstra(int s){
    vector<int> used(n,-1);
    vector<ll> dist(n,LINF);
    dist[s] = 0;

    while(true){
        ll minv = LINF;
        int u = -1;
        rep(i,n){
            if(used[i] == -1 && dist[i] < minv){
                u = i;
                minv = dist[i];
            } 
        }

        if(minv == LINF) break;
        used[u] = 1;

        for(auto v : G[u]){
            if(used[v.first] == -1 && dist[v.first] > dist[u] + v.second){
                dist[v.first] = dist[u] + v.second;
            } 
        }
    }
    rep(i,n){
        cout << dist[i] << endl;
    }
}

Compiler output:
a.cc: In function 'void dijkstra(int)':
a.cc:3:5: error: 'vector' was not declared in this scope
    3 |     vector<int> used(n,-1);
      |     ^~~~~~
a.cc:3:12: error: expected primary-expression before 'int'
    3 |     vector<int> used(n,-1);
      |            ^~~
a.cc:4:12: error: 'll' was not declared in this scope
    4 |     vector<ll> dist(n,LINF);
      |            ^~
a.cc:4:21: error: 'n' was not declared in this scope
    4 |     vector<ll> dist(n,LINF);
      |                     ^
a.cc:4:23: error: 'LINF' was not declared in this scope
    4 |     vector<ll> dist(n,LINF);
      |                       ^~~~
a.cc:4:16: error: 'dist' was not declared in this scope
    4 |     vector<ll> dist(n,LINF);
      |                ^~~~
a.cc:8:11: error: expected ';' before 'minv'
    8 |         ll minv = LINF;
      |           ^~~~~
      |           ;
a.cc:10:13: error: 'i' was not declared in this scope
   10 |         rep(i,n){
      |             ^
a.cc:10:9: error: 'rep' was not declared in this scope
   10 |         rep(i,n){
      |         ^~~
a.cc:17:12: error: 'minv' was not declared in this scope
   17 |         if(minv == LINF) break;
      |            ^~~~
a.cc:18:9: error: 'used' was not declared in this scope
   18 |         used[u] = 1;
      |         ^~~~
a.cc:20:22: error: 'G' was not declared in this scope
   20 |         for(auto v : G[u]){
      |                      ^
a.cc:26:9: error: 'i' was not declared in this scope
   26 |     rep(i,n){
      |         ^
a.cc:26:5: error: 'rep' was not declared in this scope
   26 |     rep(i,n){
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define ll long long
int N;
ll C[100010][100010];
ll D[100010];
bool F[100010];
void dijkstra(int s){
  rep(i,N) D[i]=1000000000000000000;
  rep(i,N) F[i]=false;
  D[s]=0;
  while(true){
    int x=100010;
    rep(i,N) if(!F[i]&&(x==100010||D[i]<D[x])) x=i;
    if(x==100010) break;
    F[x]=true;
    rep(i,N) D[i]=min(D[i],D[x]+C[x][i]);
  }
}
int main(){
  int M,S,T;
  cin>>N>>M>>S>>T;
  int U[M],V[M],A[M],B[M],X[N];
  rep(i,M) cin>>U[i]>>V[i]>>A[i]>>B[i];
  rep(i,N) rep(j,N) C[i][j]=1000000000000000000;
  rep(i,M){
    C[U[i]-1][V[i]-1]=A[i];
    C[V[i]-1][U[i]-1]=A[i];
  }
  dijkstra(S-1);
  rep(i,N) X[i]=D[i];
  rep(i,N){
    C[U[i]-1][V[i]-1]=B[i];
    C[V[i]-1][U[i]-1]=B[i];
  }
  dijkstra(T-1);
  ll ans[N];
  ans[N-1]=1000000000000000-X[N-1]-D[N-1];
  rep(i,N-1) ans[N-2-i]=max(ans[N-1-i],1000000000000000-X[N-2-i]-D[N-2-i]);
  rep(i,N) cout<<ans[i]<<endl;
}

Compiler output:
/tmp/ccB7jO41.o: in function `dijkstra(int)':
a.cc:(.text+0x24): relocation truncated to fit: R_X86_64_PC32 against symbol `D' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0x56): relocation truncated to fit: R_X86_64_PC32 against symbol `F' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0x7d): relocation truncated to fit: R_X86_64_PC32 against symbol `D' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0xa1): relocation truncated to fit: R_X86_64_PC32 against symbol `F' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0xc9): relocation truncated to fit: R_X86_64_PC32 against symbol `D' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0xe1): relocation truncated to fit: R_X86_64_PC32 against symbol `D' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0x118): relocation truncated to fit: R_X86_64_PC32 against symbol `F' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0x13c): relocation truncated to fit: R_X86_64_PC32 against symbol `D' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0x183): relocation truncated to fit: R_X86_64_PC32 against symbol `D' defined in .bss section in /tmp/ccB7jO41.o
a.cc:(.text+0x1ad): relocation truncated to fit: R_X86_64_PC32 against symbol `D' defined in .bss section in /tmp/ccB7jO41.o
/tmp/ccB7jO41.o: in function `main':
a.cc:(.text+0x5bc): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
#define rep(i, k, n) for (ll i=k; i<(ll)n; ++i)
#define REP(i, n) rep(i, 0, n)

const ll MOD = (ll)1e9 + 7;
const ll HIGHINF = (ll)1e18;

int main() {
  ll n, m, s, t; scanf("%ld %ld %ld %ld", &n, &m, &s, &t);
  V<V<P<ll, ll>>> anode(n, V<P<ll, ll>>()), bnode(n, V<P<ll, ll>>());
  REP(i, m) {
    ll u, v, a, b; scanf("%ld %ld %ld %ld", &u, &v, &a, &b);
    anode.at(u-1).push_back({a, v-1});
    anode.at(v-1).push_back({a, u-1});
    bnode.at(u-1).push_back({b, v-1});
    bnode.at(v-1).push_back({b, u-1});
  }
  vll ad(n, HIGHINF), bd(n, HIGHINF);

  priority_queue<P<ll, ll>> quea;  // cost, edge
  ad[s-1] = 0; quea.push({0, s-1});
  while (!quea.empty()) {  // yenのsからの最短経路長
    P<ll, ll> q = quea.top(); quea.pop();
    ll v = q.second;
    if (ad[v] < q.first) continue;  // コストが大きいなら更新の必要なし
    REP(i, anode[v].size()) {
      P<ll, ll> to = anode[v][i];
      if (as[to.second] > ad[v] + to.first) {
        ad[to.second] = ad[v] + to.first;
        quea.push({ad[to.second], to.second});
      }
    }
  }

  priority_queue<P<ll, ll>> queb;  // cost, edge
  bd[t-1] = 0; queb.push({0, t-1});
  while (!queb.empty()) {  // yenのsからの最短経路長
    P<ll, ll> q = queb.top(); queb.pop();
    ll v = q.second;
    if (bd[v] < q.first) continue;  // コストが大きいなら更新の必要なし
    REP(i, bnode[v].size()) {
      P<ll, ll> to = bnode[v][i];
      if (bd[to.second] > bd[v] + to.first) {
        bd[to.second] = bd[v] + to.first;
        queb.push({bd[to.second], to.second});
      }
    }
  }

  vll ans(n);
  ll minc = HIGHINF;
  for (ll i=n-1; i>=0; i--) {
    ll tmpc = ad[i] + bd[i];
    minc = min(minc, tmpc);
    ans[i] = 1e15 - minc;
  }
  REP(i, n) cout << ans[i] << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:11: error: 'as' was not declared in this scope; did you mean 'ad'?
   34 |       if (as[to.second] > ad[v] + to.first) {
      |           ^~
      |           ad
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
int inf=1e18;

struct graph{

struct edge{int to,cst;};
struct pos{int i,d;
	pos(){};
	pos(int i_,int d_){i=i_,d=d_;};
	bool operator<(const pos& r)const{return d>r.d;}
};

	
vector<vector<edge>>g;
vector<bool>used;
int n;
int o;
vector<int>dist;
priority_queue<pos> pq;

	graph(){};
	graph(int n_,int o_){
	n=n_,o=o_;
	g.resize(n);
	used.assign(n,false);
	dist.resize(n,inf);
	};

	void add_edge(int x,int y,int cst){
		g[x].push_back(edge({y,cst}));
		g[y].push_back(edge({x,cst}));
	}

	void set_dist(){
		 pq.push(pos(o,0));
		while(!pq.empty()){
			pos x=pq.top();pq.pop();
			if(dist[x.i]<x.d)continue;
			for(auto&& w:g[x.i]){
				if(dist[w.to]> x.d+w.cst){
					dist[w.to]=x.d+w.cst;
					pq.push(pos(w.to,dist[w.to]));
				}
			} 
		}	
	}

};



signed main(){
	int n,m,s,t;cin>>n>>m>>s>>t;s--;t--;
	graph g1(n,s),g2(n,t);
	for(int i=0;i<m;i++){
		int x,y,a,b;cin>>x>>y>>a>>b;x--;y--;
		g1.add_edge(x,y,a);
		g2.add_edge(x,y,b);
	}
	g1.set_dist();
	g2.set_dist();	
	int money=1e15;
	int cst=inf;
	vector<int>cs(n);
	for(i=n-1;i>=0;i--){
		cst=min(cst,gr1.dist[i]+gr2.dist[i]);
		cs[i]=cst;
	}
	for(int i=0;i<n;i++)cout<<money-cs[i]<<endl;
}



}


Compiler output:
a.cc: In function 'int main()':
a.cc:67:13: error: 'i' was not declared in this scope
   67 |         for(i=n-1;i>=0;i--){
      |             ^
a.cc:68:29: error: 'gr1' was not declared in this scope; did you mean 'g1'?
   68 |                 cst=min(cst,gr1.dist[i]+gr2.dist[i]);
      |                             ^~~
      |                             g1
a.cc:68:41: error: 'gr2' was not declared in this scope; did you mean 'g2'?
   68 |                 cst=min(cst,gr1.dist[i]+gr2.dist[i]);
      |                                         ^~~
      |                                         g2
a.cc: At global scope:
a.cc:76:1: error: expected declaration before '}' token
   76 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
int inf=1e18;

struct graph{

struct edge{int to,cst;};
struct pos{int i,d;
	pos(){};
	pos(int i_,int d_){i=i_,d=d_;};
	bool operator<(const pos& r)const{return d>r.d;}
};

	
vector<vector<edge>>g;
vector<bool>used;
int n;
int o;
vector<int>dist;
priority_queue<pos> pq;

	graph(){};
	graph(int n_,int o_){
	n=n_,o=o_;
	g.resize(n);
	used.assign(n,false);
	dist.resize(n,inf);
	};

	void add_edge(int x,int y,int cst){
		g[x].push_back(edge({y,cst}));
		g[y].push_back(edge({x,cst}));
	}

	void set_dist(){
		 pq.push(pos({o,0}));
		while(!pq.empty()){
			pos x=pq.top();pq.pop();
			if(d[x.i]<x.d)continue;
			for(auto&& w:g[x.i]){
				if(d[w.to]> x.d+w.cst){
					d[w.to]=x.d+w.cst;
					pq.push(pos(w.to,d[w.to]));
				}
			} 
		}	
	}

};



signed main(){
	int n,m,s,t;cin>>n>>m>>s>>t;s--;t--;
	graph g1(n,s),g2(n,t);
	for(int i=0;i<m;i++){
		int x,y,a,b;cin>>x>>y>>a>>b;x--;y--;
		g1.add_edge(x,y,a);
		g2.add_edge(x,y,b);
	}
	g1.set_dist();
	g2.set_dist();	
	int money=1e15;
	int cst=inf;
	vector<int>cs(n);
	for(i=n-1;i>=0;i--){
		cst=min(cst,gr1.dist[i]+gr2.dist[i]);
		cs[i]=cst;
	}
	for(int i=0;i<n;i++)cout<<money-cs[i]<<endl;
}



}


Compiler output:
a.cc: In member function 'void graph::set_dist()':
a.cc:40:28: error: 'd' was not declared in this scope
   40 |                         if(d[x.i]<x.d)continue;
      |                            ^
a.cc:42:36: error: 'd' was not declared in this scope
   42 |                                 if(d[w.to]> x.d+w.cst){
      |                                    ^
a.cc: In function 'int main()':
a.cc:67:13: error: 'i' was not declared in this scope
   67 |         for(i=n-1;i>=0;i--){
      |             ^
a.cc:68:29: error: 'gr1' was not declared in this scope; did you mean 'g1'?
   68 |                 cst=min(cst,gr1.dist[i]+gr2.dist[i]);
      |                             ^~~
      |                             g1
a.cc:68:41: error: 'gr2' was not declared in this scope; did you mean 'g2'?
   68 |                 cst=min(cst,gr1.dist[i]+gr2.dist[i]);
      |                                         ^~~
      |                                         g2
a.cc: At global scope:
a.cc:76:1: error: expected declaration before '}' token
   76 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<pint> vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
const int MOD = 1e9 + 7;
const int INF = 1e9;

#define lli long long int

const lli MAX_N = 200010;
vector<pair<lli, lli> > G[MAX_N];
vector<illit> dijkstra(lli start){
    vector<lli> dist(MAX_N, INF);
    dist[start] = 0;//dist[i] :=　start->iまでの最短距離
    priority_queue<pair<lli, lli>, vector<pair<lli, lli> >, greater<pair<lli, lli> > >  que;
    que.push(make_pair(0, start));
    while(!que.empty()){
        lli cost, u, t;//今までにかかった時間 現在の頂点
        cost = que.top().first, u = que.top().second;
        que.pop();
        if(dist[u] < cost) continue;
        for (auto tmp : G[u]){
            lli v = tmp.first, time = tmp.second;//隣接する頂点 その頂点まで行く時間
            if(dist[v] > dist[u] + time){//u->v
                dist[v] = dist[u] + time;
                que.push(make_pair(dist[v], v));
            }
        }
    }
    return dist;
}

lli n, m, s,t;
lli u[100010], v[100010], a[100010],b[100010];
signed main(void){
    cin >> n >> m >> s>> t;
    s--;t--;
    rep(i, m){
        cin >> u[i]>>v[i]>>a[i]>>b[i];
        u[i]--, v[i]--;
        G[u[i]].pb(mp(v[i], a[i]));
        G[v[i]].pb(mp(u[i], a[i]));
    }
    auto dist1 = dijkstra(s);
    rep(i, MAX_N){
        G[i].clear();
    }
    rep(i, m){
        G[u[i]].pb(mp(v[i], b[i]));
        G[v[i]].pb(mp(u[i], b[i]));
    }
    auto dist2 = dijkstra(t);

    /*s->i->tと経由する場合のコストを出す*/

    vector<lli> o;
    rep(i, n)o.push_back(dist1[i]+dist2[i]);

    for(lli i=n-2;i>=0;i--){
    	o[i] = min(o[i],o[i+1]);
    }
    for(lli i=0;i<n;i++){
    	lli ans = 1e15 - o[i];
    	cout<<ans<<endl;
    }
    return 0;
}


Compiler output:
a.cc:23:8: error: 'illit' was not declared in this scope; did you mean 'lli'?
   23 | vector<illit> dijkstra(lli start){
      |        ^~~~~
      |        lli
a.cc:23:13: error: template argument 1 is invalid
   23 | vector<illit> dijkstra(lli start){
      |             ^
a.cc:23:13: error: template argument 2 is invalid
a.cc: In function 'int dijkstra(long long int)':
a.cc:41:12: error: cannot convert 'std::vector<long long int>' to 'int' in return
   41 |     return dist;
      |            ^~~~
      |            |
      |            std::vector<long long int>
a.cc: In function 'int main()':
a.cc:68:31: error: invalid types 'int[int]' for array subscript
   68 |     rep(i, n)o.push_back(dist1[i]+dist2[i]);
      |                               ^
a.cc:68:40: error: invalid types 'int[int]' for array subscript
   68 |     rep(i, n)o.push_back(dist1[i]+dist2[i]);
      |                                        ^
Language: C++

import heapq

INF = 1 << 60
MOD = 1000000007

def dijkstra(s):
    #print(s)
    global d, G, n
    d = [INF] * n
    d[s] = 0
    que = [(0, s)]
    heapq.heapify(que)

    while len(que) > 0:
        #print("que=", que)
        p = heapq.heappop(que)
        v = p[1]
        #print(v)
        if d[v] < p[0]:
            continue
        for e in G[v]:
            if d[e[0]] > d[v] + e[1]:
                d[e[0]] = d[v] + e[1]
                heapq.heappush(que, (d[e[0]], e[0]))

n, m, s, t = map(int, input().split())
u = [0] * m
v = [0] * m
a = [0] * m
b = [0] * m
G = []
for i in range(n):
    G.append([])
for i in range(m):
    u[i], v[i], a[i], b[i] = map(int, input().split())
    G[u[i] - 1].append((v[i] - 1, a[i]))
    G[v[i] - 1].append((u[i] - 1, a[i]))
#print("G=", G)
d = [0] * n
dijkstra(s - 1)
#print("d=", d)
ds = d[:]
G = []
for i in range(n):
    G.append([])
for i in range(m):
    G[u[i] - 1].append((v[i] - 1, b[i]))
    G[v[i] - 1].append((u[i] - 1, b[i]))
d = [0] * n
dijkstra(t - 1)
dst = []
for i in range(n):
    dst.append((d[i] + ds[i], i))
dst.sort()
change = 0
money = 1000000000000000
for i in range(n):
    while dst[change][1] < i:
        change += 1
    print(money - dst[change][0])

Compiler output:
a.cc:7:6: error: invalid preprocessing directive #print
    7 |     #print(s)
      |      ^~~~~
a.cc:15:10: error: invalid preprocessing directive #print
   15 |         #print("que=", que)
      |          ^~~~~
a.cc:18:10: error: invalid preprocessing directive #print
   18 |         #print(v)
      |          ^~~~~
a.cc:38:2: error: invalid preprocessing directive #print
   38 | #print("G=", G)
      |  ^~~~~
a.cc:41:2: error: invalid preprocessing directive #print
   41 | #print("d=", d)
      |  ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import heapq
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

//
// Created by 田代真生 on 2019-03-17.
//
#include <iostream>
#include <vector>
#include <queue>
#include <map>
#include <math.h>
using namespace std;
int main(){
    int N;
    int M;
    int s;
    int t;
    int u;
    int v;
    int a;
    int b;
    cin >> N >> M >> s >> t;
    s--;
    t--;
    vector<vector<pair<int, int> > > snuuk_dict(N);
    vector<vector<pair<int, int> > > yen_dict(N);
    priority_queue<pair<int, int>, vector<pair<int, int> >,greater<pair<int, int> > > snuuk_que;
    priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > yen_que;
    vector<int> snuuk_ls(N,-1);
    vector<int> yen_ls(N, -1);
    vector<double> sum_ls(N,0);
    pair<int, int> P;
    vector<vector <int> > emp;
    yen_ls[s] = 0;
    snuuk_ls[t] = 0;
    for(int i=0; i<M; i++){
        cin >> u >> v >> a >> b;
        u--;
        v--;
        P = make_pair(b, v);
        snuuk_dict[u].push_back(P);
        P = make_pair(b, u);
        snuuk_dict[v].push_back(P);
        yen_dict[u].push_back(make_pair(a,v));
        yen_dict[v].push_back(make_pair(a,u));
    }
    for(auto i=snuuk_dict[t].begin() ; i != snuuk_dict[t].end(); i++){
        snuuk_que.push(*i);
    }
    for(auto i=yen_dict[s].begin(); i != yen_dict[s].end(); i++){
        yen_que.push(*i);
    }
    while(!yen_que.empty()){
        P = yen_que.top();
        yen_que.pop();
        a = P.first;
        v = P.second;
        if (yen_ls[v] != -1){
            continue;
        }
        yen_ls[v] = a;
        for(auto i: yen_dict[v]){
            yen_que.push(make_pair(i.first + a, i.second));
        }
    }
    while(!snuuk_que.empty()){
        P = snuuk_que.top();
        snuuk_que.pop();
        b = P.first;
        u = P.second;
        if (snuuk_ls[u] != -1){
            continue;
        }
        snuuk_ls[u] = b;
        for(auto i: snuuk_dict[u]){
            snuuk_que.push(make_pair(i.first + b, i.second));
        }
    }
    for(int i=0; i<N; i++){
        sum_ls[i] = pow(10, 15.0) - (snuuk_ls[i] + yen_ls[i]);
    }
    for(int i=0; i<N; i++){
        cout << (long)*max_element(sum_ls.begin() + i, sum_ls.end()) << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:80:24: error: 'max_element' was not declared in this scope
   80 |         cout << (long)*max_element(sum_ls.begin() + i, sum_ls.end()) << endl;
      |                        ^~~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <functional>

using namespace std;

typedef pair<long long, long long> pll;

long long n, m, s, t;
vector<vector<pair<long long, long long> > > ag, bg;
vector<long long> acost, bcost;
vector<pair<long long, long long> > comb;

void dijkstra(long long s, vector<vector<pair<long long, long long> > > &g, vector<long long> &cost)
{
    fill(cost.begin(), cost.end(), 1e16);
    priority_queue<pll, vector<pll>, greator<pll> > pq;
    cost[s] = 0;
    pq.push(make_pair(0, s));
    while(!pq.empty())
    {
        long long xc = pq.top().first;
        long long x = pq.top().second;
        pq.pop();
        if(xc > cost[x])
        {
            continue;
        }
        for (int i = 0; i < g[x].size(); i++)
        {
            long long y = g[x][i].first;
            long long yc = g[x][i].second;
            if(xc + yc < cost[y])
            {
                cost[y] = xc + yc;
                pq.push(make_pair(xc + yc, y));
            }
        }
    }
}

int main()
{
    cin >> n >> m >> s >> t;
    s--;
    t--;
    acost.resize(n);
    bcost.resize(n);
    ag.resize(n);
    bg.resize(n);
    for (long long i = 0;i < m;i++)
    {
        long long u, v, a, b;
        cin >> u >> v >> a >> b;
        u--;
        v--;
        ag[u].push_back(make_pair(v, a));
        bg[u].push_back(make_pair(v, b));
        ag[v].push_back(make_pair(u, a));
        bg[v].push_back(make_pair(u, b));
    }

    dijkstra(s, ag, acost);
    dijkstra(t, bg, bcost);

    for (long long i = 0; i < n; i++)
    {
        comb.push_back(make_pair(acost[i] + bcost[i], i));
    }
    sort(comb.begin(), comb.end());
    long long ansi = comb[0].second;
    long long ansp = 0;
    long long init = 1e15;
    for (long long i = 0; i < n;i++)
    {
        while(i > ansi)
        {
            ansi = comb[++ansp].second;
        }
        cout << init - comb[ansp].first << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'void dijkstra(long long int, std::vector<std::vector<std::pair<long long int, long long int> > >&, std::vector<long long int>&)':
a.cc:20:38: error: 'greator' was not declared in this scope
   20 |     priority_queue<pll, vector<pll>, greator<pll> > pq;
      |                                      ^~~~~~~
a.cc:20:49: error: template argument 3 is invalid
   20 |     priority_queue<pll, vector<pll>, greator<pll> > pq;
      |                                                 ^
a.cc:20:51: error: expected unqualified-id before '>' token
   20 |     priority_queue<pll, vector<pll>, greator<pll> > pq;
      |                                                   ^
a.cc:22:5: error: 'pq' was not declared in this scope
   22 |     pq.push(make_pair(0, s));
      |     ^~
Language: C++

#include<iostream>
#include<vector>
#include<queue>

using namespace std;
#define int long long
using P = pair<int,int>;
int N,M,S,T;
struct edge{int to,idx;};//行先とindex
vector<edge> G[101000];//グラフ,二次元配列っぽくあつかってる？
vector<int> A(101000),B(101000);//円とすぬけ

vector<int> dijkstra(int s,vector<int>& cost){
    vector<int> dist(101000,1e18); dist[s] = 0;//距離を無限に
    priority_queue<P,vector<P>,greater<P>> Q;
    Q.push({0,s});

    while(!Q.empty()){
        P p = Q.top(); Q.pop();
        if(dist[p.second] < p.first) continue;
        for(auto & e : G[p.second]){
            if(dist[e.to] > dist[p.second] + cost[e.idx]){
                dist[e.to] = dist[p.second] + cost[e.idx];
                Q.push({dist[e.to],e.to});
            }
        }
    }
    return dist;
}
signed main(){
    cin>>N>>M>>S>>T;
    for(int i=0;i<M;++i){
        int u,v;
        cin>>u>>v>>A[i]>>B[i];
        G[u].push_back({v,i});//駅uからつながるvと年i
        G[v].push_back({u,i});//駅vからつながる
    }

    auto yen = dijkstra(S,A);
    auto snuke = dijkstra(T,B);

    int ans = 0;
    vector<int> res;
    int base = 1e15;
    for(int i=N;i>0;--i){
        ans = max(ans,base - yen[i] - snuke[i]);
        res.push_back(ans);
    }

    reverse(res.begin(),res.end());

    for(auto x :res) cout<<x<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:5: error: 'reverse' was not declared in this scope
   50 |     reverse(res.begin(),res.end());
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <utility>
#include <string>

#define INF 1000000000000000
#define MAX 100010
#define ll long long
#define P pair<ll,ll>
using namespace std;

vector<pair<ll,ll>> G[MAX],H[MAX];
long long d[MAX],s,t,y[MAX],snu[MAX],ans[MAX];
bool used[MAX];
priority_queue<P,vector<P>,greater<P>> que;
ll V,E;

void dijkstra(int s){
	for(int i=0;i<V;i++){
		d[i] = INF*100;
		used[i] = false;
	}
	que.push({0,s});
	while(!que.empty()){
		P p = que.top();
		que.pop();
		ll x = p.second;
		if(used[x]) continue;
		used[x] = true; d[x] = p.first;
		for(P e: G[x]){
			if(d[e.first]>d[x]+e.second){
				que.push({d[x]+e.second,e.first});
			}
		}
	}
}

void dijkstra(int s){
	for(int i=0;i<V;i++){
		d[i] = INF*100;
		used[i] = false;
	}
	que.push({0,s});
	while(!que.empty()){
		P p = que.top();
		que.pop();
		ll x = p.second;
		if(used[x]) continue;
		used[x] = true; d[x] = p.first;
		for(P e: H[x]){
			if(d[e.first]>d[x]+e.second){
				que.push({d[x]+e.second,e.first});
			}
		}
	}
}

int main(){
	cin >> V >> E >> s >> t;
	s--; t--;
	int i;
	for(i=0;i<E;i++){
		ll u,v,a,b;
		cin >> u >> v >> a >> b;
		u--; v--;
		G[u].push_back({v,a});
		G[v].push_back({u,a});
		H[u].push_back({v,b});
		H[v].push_back({u,b});
	}
	
	dijkstra(s);
	for(i=0;i<V;i++){
		y[i] = d[i];
	}
	
	dijkstra2(t);
	for(i=0;i<V;i++){
		snu[i] = d[i];
	}
	ans[V] = INF*1000;
	for(i=V-1;i>=0;i--){
		ans[i] = min(ans[i+1],y[i]+snu[i]);
	}
	
	for(i=0;i<V;i++){
		cout << INF - ans[i] << endl;
	}
}

Compiler output:
a.cc:40:6: error: redefinition of 'void dijkstra(int)'
   40 | void dijkstra(int s){
      |      ^~~~~~~~
a.cc:20:6: note: 'void dijkstra(int)' previously defined here
   20 | void dijkstra(int s){
      |      ^~~~~~~~
a.cc: In function 'int main()':
a.cc:79:9: error: 'dijkstra2' was not declared in this scope; did you mean 'dijkstra'?
   79 |         dijkstra2(t);
      |         ^~~~~~~~~
      |         dijkstra
Language: C++

#include<bits/stdc++.h>
#define INF 20000000001
using namespace std;
struct edge{
  int to,cost_y,cost_s;
};

int main(){
  long long int n,m,s,t;
  cin>>n>>m>>s>>t;
  int d_s[n][n]={INF};
  cout<<"t"<<endl;
  vector<edge> edges[n];
  for(int i=0;i<n;i++){
    edge e={i,0,0};
    edges[i].push_back(e);
  }


  int u[m],v[m],a[m],b[m];

  for(int i=0;i<m;i++){
    cin>>u[i]>>v[i]>>a[i]>>b[i];
    edge e1={u[i]-1,a[i],b[i]};
    edges[v[i]-1].push_back(e1);
    edge e2={v[i]-1,a[i],b[i]};
    edges[u[i]-1].push_back(e2);
}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:13: error: narrowing conversion of '20000000001' from 'long int' to 'int' [-Wnarrowing]
    2 | #define INF 20000000001
      |             ^~~~~~~~~~~
a.cc:11:18: note: in expansion of macro 'INF'
   11 |   int d_s[n][n]={INF};
      |                  ^~~
Language: C++

#include<bits/stdc++.h>
#define INF 20000000001
using namespace std;
struct edge{
  int to,cost_y,cost_s;
};

int main(){
  long long int n,m,s,t;
  cin>>n>>m>>s>>t;
  d_s[n][n]={INF};
  cout<<"t"<<endl;
  vector<edge> edges[n];
  for(int i=0;i<n;i++){
    edge e={i,0,0};
    edges[i].push_back(e);
  }

  int u[m],v[m],a[m],b[m];

  for(int i=0;i<m;i++){
    cin>>u[i]>>v[i]>>a[i]>>b[i];
    edge e1={u[i]-1,a[i],b[i]};
    edges[v[i]-1].push_back(e1);
    edge e2={v[i]-1,a[i],b[i]};
    edges[u[i]-1].push_back(e2);

}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'd_s' was not declared in this scope
   11 |   d_s[n][n]={INF};
      |   ^~~
Language: C++

8 12 3 8
2 8 685087149 857180777
6 7 298270585 209942236
2 4 346080035 234079976
2 5 131857300 22507157
4 8 30723332 173476334
2 6 480845267 448565596
1 4 181424400 548830121
4 5 57429995 195056405
7 8 160277628 479932440
1 6 475692952 203530153
3 5 336869679 160714712
2 7 389775999 199123879

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 8 12 3 8
      | ^