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

#include<stdio.h>

int V,E,R,S[500010],T[500010],D[500010];
int C[100000];
const int INF=10000*100000+100;
int i,t,j;

int main()
{

	for(i=0;i<100000;i++)
	{
		C[i]=INF;
	}

	scanf("%d",&V);
	scanf("%d",&E);
	scanf("%d",&R);

	C[R]=0;

	for(i=0;i<E;i++)
	{
		scanf("%d",&S[i]);
		scanf("%d",&T[i]);
		scanf("%d",&D[i]);
	}

	for(t=0;t<V;t++)
	{
		int update=-1;
		for(i=0;i<E;i++)
		{
			int s=S[i],t=T[i],d=D[i];
			if(C[s]<INF && C[t]>C[s]+d)
			{
				C[t]=C[s]+d;
				update=1;
			}
		}
		if(update==-1) break;
	}
	for(j=0;j<V;j++)
	{
		if(C[j]<INF)
			printf("%d\n",C[j]);
		else
			printf("INF\n");
	}
	return 0;
}

}

Compiler output:
a.cc:53:1: error: expected declaration before '}' token
   53 | }
      | ^
Language: C++

#include<stdio.h>

int V,E,R,S[500010],T[500010],D[500010];
    int C[100000];
    const int INF=10000*100000+100;
    int i,j;

int main()
{
	

	for(i=0;i<100000;i++)
	{
		C[i]=INF;
	}

	scanf("%d",&V);
	scanf("%d",&E);
	scanf("%d",&R);

	C[R]=0;

	for(i=0;i<E;i++)
	{
		scanf("%d",&S[i]);
		scanf("%d",&T[i]);
		scanf("%d",&D[i]);
	}

	for(t=0;t<V;t++)
	{
		int update=-1;
		for(i=0;i<E;i++)
		{
			int s=S[i],t=T[i],d=D[i];
			if(C[s]<INF && C[t]>C[s]+d)
			{
				C[t]=C[s]+d;
				update=1;
			}
		}
		if(update==-1) break;
	}
	for(j=0;j<V;j++)
	{
		if(C[j]<INF)
			printf("%d\n",C[j]);
		else
			printf("INF\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:13: error: 't' was not declared in this scope
   30 |         for(t=0;t<V;t++)
      |             ^
Language: C++

#include <cmath>
#Include <iostream>
using namespace std;

int V, E, R, S[500010], T[500010], D[500010];
int C[100010];
const int Inf = 10000*100000+100;

int main(){
 cin >> V >> E >> R;
 for(int i=0; i<E; i++){
  cin >> S[i] >> T[i] >> D[i];
 }
 for(int j=0; j<V; j++){
  C[j]=Inf;
 }
 C[R]=0;
 for(int t=0; t<V; t++){
  bool update = false;
  for(int i=0; i<E; i++){
   int s = S[i], t = T[i], d = D[i];
   if(C[s]<Inf && (C[s]+d<C[t]){
    C[t] = C[s]+d;
    update = true;
   }
  }
  if(!update)break;
 }
 
 for(int m=0; m<V; m++){
  if(C[m]==Inf){
   cout << "INF" << endl;
  }
  else{
   cout << C[m] << endl;
  }
 }
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #Include; did you mean #include?
    2 | #Include <iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:10:2: error: 'cin' was not declared in this scope
   10 |  cin >> V >> E >> R;
      |  ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <cmath>
  +++ |+#include <iostream>
    2 | #Include <iostream>
a.cc:22:32: error: expected ')' before '{' token
   22 |    if(C[s]<Inf && (C[s]+d<C[t]){
      |      ~                         ^
      |                                )
a.cc:26:3: error: expected primary-expression before '}' token
   26 |   }
      |   ^
a.cc:32:4: error: 'cout' was not declared in this scope
   32 |    cout << "INF" << endl;
      |    ^~~~
a.cc:32:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:21: error: 'endl' was not declared in this scope
   32 |    cout << "INF" << endl;
      |                     ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <cmath>
  +++ |+#include <ostream>
    2 | #Include <iostream>
a.cc:35:4: error: 'cout' was not declared in this scope
   35 |    cout << C[m] << endl;
      |    ^~~~
a.cc:35:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:20: error: 'endl' was not declared in this scope
   35 |    cout << C[m] << endl;
      |                    ^~~~
a.cc:35:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <cmath>
#include <iostream>
using namespace std;

int V, E, R, S[500010], T[500010], D[500010];
int C[100010];
const int Inf = 10000*100000+100;

int main(){
 cin >> V >> E >> R;
 for(int i=0; i<E; i++){
  cin >> S[i] >> T[i] >> D[i];
 }
 for(int j=0; j<V; j++){
  C[j]=Inf;
 }
 C[R]=0;
 for(int t=0; t<V; t++){
  bool update = false;
  for(int i=0; i<E; i++){
   int s = S[i], t = T[i], d = D[i];
   if(C[s]<Inf && (C[s]+d<C[t]){
    C[t] = C[s]+d;
    update = true;
   }
  }
  if(!update)break;
 }
 
 for(int m=0; m<V; m++){
  if(C[m]==Inf){
   cout << "INF" << endl;
  }
  else{
   cout << C[m] << endl;
  }
 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:32: error: expected ')' before '{' token
   22 |    if(C[s]<Inf && (C[s]+d<C[t]){
      |      ~                         ^
      |                                )
a.cc:26:3: error: expected primary-expression before '}' token
   26 |   }
      |   ^
Language: C++

#include <iostream>
using namespace std;

int V, E, R, S[500010], T[500010], D[500010];
int C[100010];

const int Inf = 10000*100000+100;

int main() {
  cin >> V >> E >> R;
  for (int i=0;i<E;++i)
    cin >> S[i] >> T[i] >> D[i];
  for (int i=0;i<V;++i) {
    if (i==R)
      C[i] = 0;
    else
      C[i] = Inf;
  }
  for (int t=0;t<V;++t) {
    bool update = false;
    for (int i=0;i<E;++i) {
      int s = S[i], t = T[i], d = D[i];
      if (C[s]<Inf && C[s]+D[i]<C[t]) {
	C[t] = C[s]+D[i];
	update = true;
      }
    }
    if (!update) break; // 辺を一巡して更新がなければ打ち切って良い
  }
  for (int i=0;i<V;++i) {
    if (C[i]>100000)
      cout << INF << endl;
    else
      cout << C[i] << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:15: error: 'INF' was not declared in this scope; did you mean 'Inf'?
   32 |       cout << INF << endl;
      |               ^~~
      |               Inf
Language: C++

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

#define TEISU 1000000
#define INF 1145141919810LL
#define BLACK 2
#define GRAY 1
#define WHITE 0
#define MAX_N 500000

long long d[MAX_N];
long long color[MAX_N]
vector<long lomg> x[MAX_N];

priority_queue<long long,vector<long long>,greater<long long>>Q;
 
void dijkstra(){
    while(!Q.empty()){
        int A=Q.top()/TEISU;
        int B=Q.top()%TEISU;
        Q.pop();
        color[B]=BLACK;
 
        if(d[B]<A*(-1))continue;
 
        for(int v=0;v<x[B].size();v++){
            int w=x[B][v]/TEISU;
 
            if(color[w]==BLACK)continue;
 
            if(d[w]>d[B]+x[B][v]%TEISU){
 
                d[w]=d[B]+x[B][v]%TEISU;
                Q.push(d[w]*TEISU+w);
                color[w]=GRAY;
 
            }
        }
    }
}

int main(){
	int n,m,r,a,b,c;
	cin>>n>>m;
	for(int i=0;i<m;i++){
		cin>>a>>b>>c;
		x[a].push_back(b*TEISU+c);
	}
	Q.push(c);
	for(int i=0;i<MAX_N;i++){color[i]=WHITE;d[i]=INF;}
	dijkstra();
	for(int i=0;i<n;i++){cout<<d[i]<<endl;}
	return 0;
}

Compiler output:
a.cc:16:1: error: expected initializer before 'vector'
   16 | vector<long lomg> x[MAX_N];
      | ^~~~~~
a.cc: In function 'void dijkstra()':
a.cc:25:9: error: 'color' was not declared in this scope; did you mean 'tolower'?
   25 |         color[B]=BLACK;
      |         ^~~~~
      |         tolower
a.cc:29:23: error: 'x' was not declared in this scope
   29 |         for(int v=0;v<x[B].size();v++){
      |                       ^
a.cc: In function 'int main()':
a.cc:50:17: error: 'x' was not declared in this scope
   50 |                 x[a].push_back(b*TEISU+c);
      |                 ^
a.cc:53:34: error: 'color' was not declared in this scope; did you mean 'tolower'?
   53 |         for(int i=0;i<MAX_N;i++){color[i]=WHITE;d[i]=INF;}
      |                                  ^~~~~
      |                                  tolower
Language: C++

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

#define TEISU 1000000
#define INF 1145141919810LL
#define BLACK 2
#define GRAY 1
#define WHITE 0
#define MAX_N 500000

long long d[MAX_N];
long long color[MAX_N]
vector<long long> x[MAX_N];

priority_queue<long long,vector<long long>,greater<long long>>Q;
 
void dijkstra(){
    while(!Q.empty()){
        int A=Q.top()/TEISU;
        int B=Q.top()%TEISU;
        Q.pop();
        color[B]=BLACK;
 
        if(d[B]<A*(-1))continue;
 
        for(int v=0;v<x[B].size();v++){
            int w=x[B][v]/TEISU;
 
            if(color[w]==BLACK)continue;
 
            if(d[w]>d[B]+x[B][v]%TEISU){
 
                d[w]=d[B]+x[B][v]%TEISU;
                Q.push(d[w]*TEISU+w);
                color[w]=GRAY;
 
            }
        }
    }
}

int main(){
	int n,m,r,a,b,c;
	cin>>n>>m;
	for(int i=0;i<m;i++){
		cin>>a>>b>>c;
		x[a].push_back(b*TEISU+c);
	}
	Q.push(c);
	for(int i=0;i<MAX_N;i++){color[i]=WHITE;d[i]=INF;}
	dijkstra();
	for(int i=0;i<n;i++){cout<<d[i]<<endl;}
	return 0;
}

Compiler output:
a.cc:16:1: error: expected initializer before 'vector'
   16 | vector<long long> x[MAX_N];
      | ^~~~~~
a.cc: In function 'void dijkstra()':
a.cc:25:9: error: 'color' was not declared in this scope; did you mean 'tolower'?
   25 |         color[B]=BLACK;
      |         ^~~~~
      |         tolower
a.cc:29:23: error: 'x' was not declared in this scope
   29 |         for(int v=0;v<x[B].size();v++){
      |                       ^
a.cc: In function 'int main()':
a.cc:50:17: error: 'x' was not declared in this scope
   50 |                 x[a].push_back(b*TEISU+c);
      |                 ^
a.cc:53:34: error: 'color' was not declared in this scope; did you mean 'tolower'?
   53 |         for(int i=0;i<MAX_N;i++){color[i]=WHITE;d[i]=INF;}
      |                                  ^~~~~
      |                                  tolower
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define INF = 1<<30
int main(){
	int  v,e,r,s,t;
	cin>>v>>e>>r;
	int cost[v][v],d[v];
	bool used[v];
	fill(d,d+v,INF);
	fill(used,used+v,false);
	fill(cost[0],cost[v-1],INF);
	for(int i=0;i<e;i++)cin>>s>>t,cin>>cost[s][t];
	d[r]=0;
	while(true){
		int f=-1;
		for(int i=0;i<v;i++)if(!used[i]&&d[i]<d[f])f=i;
		if(f==-1)break;
		used[f]=true;
		for(int i=0;i<v;i++)if(cost[f][i]!=INF)d[i]=min(d[i],d[f]+cost[f][i]);
	}
	for(int i=0;i<v;i++){
		if(d[i]==INF)cout<<"INF"<<endl;
		else cout<<d[i]<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:13: error: expected primary-expression before '=' token
    3 | #define INF = 1<<30
      |             ^
a.cc:9:20: note: in expansion of macro 'INF'
    9 |         fill(d,d+v,INF);
      |                    ^~~
a.cc:3:13: error: expected primary-expression before '=' token
    3 | #define INF = 1<<30
      |             ^
a.cc:11:32: note: in expansion of macro 'INF'
   11 |         fill(cost[0],cost[v-1],INF);
      |                                ^~~
a.cc:3:13: error: expected primary-expression before '=' token
    3 | #define INF = 1<<30
      |             ^
a.cc:19:52: note: in expansion of macro 'INF'
   19 |                 for(int i=0;i<v;i++)if(cost[f][i]!=INF)d[i]=min(d[i],d[f]+cost[f][i]);
      |                                                    ^~~
a.cc:3:13: error: expected primary-expression before '=' token
    3 | #define INF = 1<<30
      |             ^
a.cc:22:26: note: in expansion of macro 'INF'
   22 |                 if(d[i]==INF)cout<<"INF"<<endl;
      |                          ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define INF = 1<<15
int main(){
	int  v,e,r,s,t;
	cin>>v>>e>>r;
	int cost[v][v],d[v];
	bool used[v];
	fill(d,d+v,INF);
	fill(used,used+v,false);
	fill(cost[0],cost[v-1],INF);
	for(int i=0;i<e;i++)cin>>s>>t,cin>>cost[s][t];
	d[r]=0;
	while(true){
		int f=-1;
		for(int i=0;i<v;i++)if(!used[i]&&d[i]<d[f])f=i;
		if(f==-1)break;
		used[f]=true;
		for(int i=0;i<v;i++)if(cost[f][i]!=INF)d[i]=min(d[i],d[f]+cost[f][i]);
	}
	for(int i=0;i<v;i++){
		if(d[i]==INF)cout<<"INF"<<endl;
		else cout<<d[i]<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:13: error: expected primary-expression before '=' token
    3 | #define INF = 1<<15
      |             ^
a.cc:9:20: note: in expansion of macro 'INF'
    9 |         fill(d,d+v,INF);
      |                    ^~~
a.cc:3:13: error: expected primary-expression before '=' token
    3 | #define INF = 1<<15
      |             ^
a.cc:11:32: note: in expansion of macro 'INF'
   11 |         fill(cost[0],cost[v-1],INF);
      |                                ^~~
a.cc:3:13: error: expected primary-expression before '=' token
    3 | #define INF = 1<<15
      |             ^
a.cc:19:52: note: in expansion of macro 'INF'
   19 |                 for(int i=0;i<v;i++)if(cost[f][i]!=INF)d[i]=min(d[i],d[f]+cost[f][i]);
      |                                                    ^~~
a.cc:3:13: error: expected primary-expression before '=' token
    3 | #define INF = 1<<15
      |             ^
a.cc:22:26: note: in expansion of macro 'INF'
   22 |                 if(d[i]==INF)cout<<"INF"<<endl;
      |                          ^~~
Language: C++

#include<iostream>
#include<math.h>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
#define INF 10000000; 


int partition(int A[], int p, int r) {
	int x = A[r];
	int i = p - 1;
	for (int j = p;j < r;j++) {
		if (x >= A[j]) {
			i = i + 1;
			swap(A[i], A[j]);
		}
	}
	swap(A[i + 1], A[r]);
	return i + 1;
}
void quicksort(int A[], int p, int r) {
	if (p < r) {
		int q = partition(A, p, r);
		quicksort(A, p, q - 1);
		quicksort(A, q + 1, r);
	}
}

int getNumberOfCoin(int C[], int n, int m) {
	int T[50000];
	for (int j = 0;j <= n;j++) {
		T[j] = INF;
	}
	T[0] = 0;
	for (int i = 0;i < m;i++) {
		for (int j = 0;j <= n;j++) {
			if (j - C[i] >= 0) {
				T[j] = min(T[j], T[j - C[i]] + 1);
			}
		}
	}
	return T[n];
}
int knapsack(int w, int n, int* v, int* ww) {
	int W[101][101];
	for (int j = 0;j <= w;j++) {
		W[0][j] = 0;
	}
	for (int i = 0;i < n;i++) {
		for (int k = 0;k < n;k++) {
			for (int j = 0;j <= w;j++) {
				if (j - ww[k] < 0) {
					W[i + 1][j] = W[i][j];
				}
				if (j - ww[i] >= 0) {
					W[i + 1][j] = max(W[i][j], W[i][j - ww[k]] + v[k]);

				}
			}
		}
	}
	return W[n][w];
}
int knapsack2(int w, int n, int* v, int* ww) {
	int W[101];
	for (int j = 0;j <= w;j++) {
		W[j] = 0;
	}
	for (int i = 0;i < n;i++) {
		for (int j = 0;j <= w;j++) {
			if (j - ww[i] >= 0) {
				W[j] = max(W[j], W[j - ww[i]] + v[i]);
			}
		}
	}
	return W[w];
}
void minlen(int V,int r,int ds[100000][100000]) {
	int u[100000];
	int f[100000];
	for (int i = 0;i < V;i++) {
		u[i] = INF;
	}
	int s = r; u[r] = 0;
	for (int m = 1;m < V;m++) {
		f[s] = 1;
		for (int i = 0;i < V;i++) {
			if (ds[s][i]>0) {
				if (u[i] > u[s] + ds[s][i]) u[i] = u[s] + ds[s][i];
			}
		}
		int MINLEN = INF;
		for (int i = 0;i < V;i++) {
			if (f[i] == 1) continue;
			if (u[i] < MINLEN) {
				MINLEN = u[i];
				s = i;
			}
		}
	}
	for (int i = 0;i < V;i++) {
		if (u[i] == 10000000) cout << "INF" << endl;
		else cout << u[i]<<endl;
	}
}
int main() {
	int V,E,r;
	cin >> V >> E>>r;
	int si, vi;
	int ds[10000][10000], d[211];
	for (int i = 0;i < V;i++) {
		for (int j = 0;j < V;j++) {
			ds[i][j] = 0;
		}
	}
	for (int i = 0;i < E;i++) {
		if (cin >> si >> vi) {
			cin >> ds[si][vi];
		}
	}
	minlen(V, r, ds);
	cin >> V;
	return 0;
	


}

Compiler output:
a.cc: In function 'int main()':
a.cc:122:22: error: cannot convert 'int (*)[10000]' to 'int (*)[100000]'
  122 |         minlen(V, r, ds);
      |                      ^~
      |                      |
      |                      int (*)[10000]
a.cc:79:29: note:   initializing argument 3 of 'void minlen(int, int, int (*)[100000])'
   79 | void minlen(int V,int r,int ds[100000][100000]) {
      |                         ~~~~^~~~~~~~~~~~~~~~~~
Language: C++

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

using namespace std;

#define INF 100000000
typedef pair<int,int> P;
int v,e,r;
int s[1000000],t[1000000],d[10000000];

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

  while(!pq.empty()){
    P tmp=pq.top(); pq.pop();
    if(tmp.first>res[tmp,second]) continue;
    for(int i=0;i<e;i++){
      if(tmp.second==s[i]){
        if(res[t[i]]>res[s[i]]+d[i]){
          res[t[i]]=res[s[i]]+d[i];
          pq.push(P(res[t[i]],t[i]));
        }
      }
    }
  }
  for(int i=0;i<v;i++){
    if(res[i]==INF) printf("INF\n");
    else  printf("%d\n",res[i]);
  }
}




int main(){
  scanf("%d%d%d",&v,&e,&r);
  for(int i=0;i<e;i++){
    scanf("%d%d%d",&s[i],&t[i],&d[i]);
  }

/*  for(int i=0;i<e;i++){
    s[i+e]=t[i];
    t[i+e]=s[i];
    d[i+e]=d[i];
  }
*/
  dijkstra();

  return 0;
}

Compiler output:
a.cc: In function 'void dijkstra()':
a.cc:24:26: error: 'second' was not declared in this scope
   24 |     if(tmp.first>res[tmp,second]) continue;
      |                          ^~~~~~
Language: C++

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

typedef pair<int, int> i_i;
struct edge { int v, w; };

vector<int> dijkstra(int N, vector<vector<edge> >& G, int s) {
	vector<int> d(N, INT_MAX);
	d[s] = 0;
	priority_queue<i_i, vector<i_i>, greater<i_i> > pq;
	pq.push(i_i(0, s));
	while (pq.size()) {
		i_i p = pq.top(); pq.pop();
		int u = p.second;
		if (p.first > d[u]) continue;
		for (edge e: G[u])
			if (d[e.v] > d[u] + e.w) {
				d[e.v] = d[u] + e.w;
				pq.push(i_i(d[e.v], e.v));
			}
	}
	return d;
}


int main() {
	int N, M, s; cin >> N >> M >> s;
	vector<vector<edge> > G(N);
	while (M--) {
		int u, v, w; scanf("%d%d%d", &u, &v, &w);
		G[u].push_back(edge{v, w});
	}
	vector<int> d = dijkstra(N, G, s);
	for (int u = 0; u < N; u++)
		if (d[u] < INT_MAX) printf("%d\n", d[u]);
		else printf("INF\n");
}

Compiler output:
a.cc: In function 'std::vector<int> dijkstra(int, std::vector<std::vector<edge> >&, int)':
a.cc:12:26: error: 'INT_MAX' was not declared in this scope
   12 |         vector<int> d(N, INT_MAX);
      |                          ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <queue>
  +++ |+#include <climits>
    5 | #include <vector>
a.cc: In function 'int main()':
a.cc:39:28: error: 'INT_MAX' was not declared in this scope
   39 |                 if (d[u] < INT_MAX) printf("%d\n", d[u]);
      |                            ^~~~~~~
a.cc:39:28: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

// GRL_1_A
#include <iostream>
#include <vector>
#include <queue>
#include <math.h>
#define   N    pow(10, 30);
using namespace std;

struct edge{
	int adj;
	int dis;
};

int main(){
	int V, E, r, s, t, d, x;
	vector<vector<edge> > A;
	vector<int> distance;
	queue<int> ver;
	edge e;

	cin>>V>>E>>r;

	A.resize(V);
	for(int i=0;i<V;i++){
		distance.push_back(N);
	}
	distance[r] = 0;

	for(int j=0;j<E;j++){
		cin>>s>>t>>d;
		e.adj = t;
		e.dis = d;
		A[s].push_back(e);
	}
	
	ver.push(r);
	while(!ver.empty()){
		x = ver.front();
		for(int i=0;i<A[x].size();i++){
			if(distance[A[x][i].adj] > distance[x] + A[x][i].dis){
				distance[A[x][i].adj] = distance[x] + A[x][i].dis;
				ver.push(A[x][i].adj);
			}
		}
		ver.pop();
	}
	
	for(int i=0;i<V;i++){
		if(distance[i] >= N)
			cout<<"INF"<<endl;
		else
			cout<<distance[i]<<endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:27: error: expected ')' before ';' token
    6 | #define   N    pow(10, 30);
      |                           ^
a.cc:25:36: note: in expansion of macro 'N'
   25 |                 distance.push_back(N);
      |                                    ^
a.cc:25:35: note: to match this '('
   25 |                 distance.push_back(N);
      |                                   ^
a.cc:25:37: error: expected primary-expression before ')' token
   25 |                 distance.push_back(N);
      |                                     ^
a.cc:49:36: error: expected primary-expression before ')' token
   49 |                 if(distance[i] >= N)
      |                                    ^
Language: C++

#include <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <vector>
#include <cstdlib>
#include <cstdio>

using namespace std;

struct edge{
	int start, target, weight;
};

const int INF = INT_MAX - 20000;


int main(){
	int init_buf;
	cin >> init_buf;
	const int num_of_node = init_buf;
	cin >> init_buf;
	const int num_of_edge = init_buf;
	cin >> init_buf;
	const int start_point = init_buf;

	edge *edges = new edge[num_of_edge];
	int *res = new int[num_of_node];

	for(int i = 0; i < num_of_node; i ++)
		res[i] = INF;
	for(int i = 0; i < num_of_edge; i ++)
		cin >> edges[i].start >> edges[i].target >> edges[i].weight;

	res[start_point] = 0;
	while(true){
		bool update = false;

		for(int i = 0; i < num_of_edge; i ++){
			edge e = edges[i];
			if(res[e.start] == INF) continue;	
			int test = res[e.start] + e.weight; 
			if(test < res[e.target]){
				res[e.target] = test;
				update = true;
			}
		}
		//cout << "++++state++++"  << endl;
		//for(int i = 0; i < num_of_node; i ++){
		//	if(res[i] != INF) cout << res[i];
		//	else cout << "INF";
		//	cout << endl;
		//}

		if(!update)break;
	}

	for(int i = 0; i < num_of_node; i ++){
		if(res[i] != INF) cout << res[i];
		else cout << "INF";
		cout << endl;
	}

	delete [] edges;
	delete [] res;
}

Compiler output:
a.cc:15:17: error: 'INT_MAX' was not declared in this scope
   15 | const int INF = INT_MAX - 20000;
      |                 ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    7 | #include <cstdio>
  +++ |+#include <climits>
    8 |
Language: C++

#include <utility>
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <queue>
using namespace std;
typedef pair<int,int> p;
int d[100003];
vector<p>edge[100002];
int main()
{
    priority_queue<p,vector<p>,greater<p>> que;
    int v,e,r;
    int s,t,d0;
    cin>>v>>e>>r;
    for(int i=0;i<v;i++){d[i]=INT_MAX;}
    for(int i=0;i<e;i++){
        scanf("%d%d%d",&s,&t,&d0);
        edge[s].push_back(p(t,d0));}
    que.push(p(0,r));
    d[r]=0;
    while(!que.empty()){
        p cur=que.top();
        que.pop();
        if(d[cur.second]<cur.first)continue;
        for(int i=0;i<edge[cur.second].size();i++){
            p to=edge[cur.second][i];
            if(d[to.first]>cur.first+to.second){
                d[to.first]=cur.first+to.second;
                que.push(p(d[to.first],to.second));}
        }
    }
    for(int i=0;i<v;i++){
        if(d[i]==INT_MAX)cout<<"INF"<<endl;
    else
        cout<<d[i]<<endl; }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:31: error: 'INT_MAX' was not declared in this scope
   17 |     for(int i=0;i<v;i++){d[i]=INT_MAX;}
      |                               ^~~~~~~
a.cc:7:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    6 | #include <queue>
  +++ |+#include <climits>
    7 | using namespace std;
a.cc:35:18: error: 'INT_MAX' was not declared in this scope
   35 |         if(d[i]==INT_MAX)cout<<"INF"<<endl;
      |                  ^~~~~~~
a.cc:35:18: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include<cstdio>
#include<algorithm>
#include<vector>
#include<iostream>
#include<queue>
#define INF 10000000

using namespace std;

struct edge{int to,cost;};
typedef pair<int,int> P;

int v,e,r;
int s[500003],t[500003],c[500003];
int d[100003];
vector<edge> G[500003];

void dijkstra(int s){
  priority_queue<P,vector<P>,greater<P> > que;
  fill(d,d+v,INF);
  d[s]=0;
  que.push(P(0,s));

  while(!que.empty()){
    P p=que.top(); que.pop();
    int u=p.second;
    if(d[u]<p.first) continue;
    for(int i=0;i<G[u].size();i++){
      edge e=G[u][i];
      if(d[e.to]>d[u]+e.cost){
        d[e.to]=d[u]+e.cost;
        que.push(P(d[e.to],e.to));
      }}}}


int main(){
  scanf("%d%d%d",&v,&e,&r);
  for(int i=0;i<e;i++){
    scanf("%d%d%d",&s[i],&t[i],&c[i]);
    edge tmp{t[i],c[i]};
    G[s[i]].push_bash(tmp);
  }


  init();

  dijkstra(r);

  for(int i=0;i<v;i++){
    if(d[i]==INF) printf("INF\n");
    else printf("%d\n",d[i]);
  }
  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:13: error: 'class std::vector<edge>' has no member named 'push_bash'; did you mean 'push_back'?
   41 |     G[s[i]].push_bash(tmp);
      |             ^~~~~~~~~
      |             push_back
a.cc:45:3: error: 'init' was not declared in this scope; did you mean 'int'?
   45 |   init();
      |   ^~~~
      |   int
Language: C++

#include <stdio.h>
#include <stdlib.h>
#define MAX_NODES 500000
#define INF 1010001000

typedef struct edge {
    int to, cost;
    struct edge *next;
}edge;

typedef struct vertex {
    int value, edges;
    struct edge *head;
}vertex;

typedef struct pair {
    int f, s;
}pair;

vertex graph[MAX_NODES];
pair queue[MAX_NODES];
int sz, V, E, start;

pair pop(void);
void push(pair x);
void add_edge(int from, int to, int cost);
void dijkstra(int st);


int main(void)
{
    int i, s, t, d;
    pair a;
    scanf("%d %d %d", &V, &E, &start);
    for (i = 0; i < E; i++) {
        scanf("%d %d %d", &s, &t, &d);
        add_edge(s, t, d);
        queue[i].f = INF;
    }
    for (i = 0; i < V; i++) {
        graph[i].value = INF;
    }
    dijkstra(start);
    for (i = 0; i < V; i++) {
        if (graph[i].value == INF) {
            puts("INF");
        } else {
            printf("%d\n", graph[i].value);
        }
    }
    return 0;
}


void dijkstra(int st)
{
    int i, j, v;
    pair tmp;
    edge *now;
    //Queueの初期化
    for (i = 0; i < 100; i++) {
        queue[i].f = INF;
    }
    graph[st].value = 0;

    tmp.f = 0; tmp.s = st;
    push(tmp);

    while (queue[0].f != INF) {
        tmp = pop();
        v = tmp.s;      //現在見ているノードの番号
        now = graph[v].head;
        if (graph[v].value < tmp.f) { 
            continue;
        }
        while (now != NULL) {
            if (graph[now->to].value > graph[v].value + now->cost) {
                graph[now->to].value = graph[v].value + now->cost;
                tmp.f = graph[now->to].value; tmp.s = now->to;
                push(tmp);
            }
            now = now->next;
        }
    }
}

void add_edge(int from, int to, int cost)
{
    //fromからtoへ辺を張る
    edge *new_, *now = graph[from].head;
    new_ = (edge *)malloc(sizeof(edge));
    new_->to = to;
    new_->cost = cost;
    if (now == NULL) {
        graph[from].head = new;
    } else {
        while (now->next != NULL) {
            now = now->next;
        }
        now->next = new_;
    }
    graph[from].edges++;
}

void push(pair x)
{
    int i = sz++, p;
    //queue[sz++] = x;
    while (i > 0) {
        p = (i - 1) / 2;
        if (queue[p].f <= x.f) {
            break;
        }
        queue[i].f = queue[p].f;
        queue[i].s = queue[p].s;
        i = p;
    }
    queue[i] = x;
}

pair pop(void)
{
    int i = 0, a, b;
    pair ans = queue[0], tmp, x = queue[--sz];
    while (i * 2 + 1 < sz) {
        a = i * 2 + 1;
        b = i * 2 + 2;
        if (b < sz && queue[b].f < queue[a].f) { 
            a = b;
        }
        if (queue[a].f >= x.f) {
            break;
        }
        queue[i] = queue[a];
        i = a;
    }
    queue[i] = x;
    queue[sz].f = INF;
    return ans;
}

Compiler output:
a.cc: In function 'void add_edge(int, int, int)':
a.cc:95:31: error: expected type-specifier before ';' token
   95 |         graph[from].head = new;
      |                               ^
Language: C++

#include <iostream>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int,int> P;
struct vertex{
    vector<P> E;//cost,to
};
#define INF INT_MAX
vertex V[100000];
int minimum[100000];

int main(){
    int NV,NE,r;
    cin>>NV>>NE>>r;
    fill(minimum,minimum+100000,INF);
    for(int i=0;i<NE;i++){
        int s,t,d;
        cin>>s>>t>>d;
        V[s].E.emplace_back(d,t);
    }

    priority_queue<P,vector<P>,greater<P>> que;
    que.emplace(0,r);
    minimum[r]=0;
    while(!que.empty()){
        P p = que.top();que.pop();
        int cost = p.first, from = p.second;
        if(cost>minimum[from]) continue;
        for(auto& e:V[from].E){
            if(cost+e.first<minimum[e.second]){
                minimum[e.second]=cost+e.first;
                que.emplace(cost+e.first,e.second);
            }
        }
    }
    for(int i=0;i<NV;i++){
        if(minimum[i]==INF){
            cout<<"INF"<<endl;
        }else{
            cout<<minimum[i]<<endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'INT_MAX' was not declared in this scope
    9 | #define INF INT_MAX
      |             ^~~~~~~
a.cc:16:33: note: in expansion of macro 'INF'
   16 |     fill(minimum,minimum+100000,INF);
      |                                 ^~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <queue>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
typedef pair<int,int> P;
struct vertex{
    vector<P> E;//cost,to
};
#define INF INT_MAX
vertex V[100000];
int minimum[100000];

int main(){
    int NV,NE,r;
    cin>>NV>>NE>>r;
    fill(minimum,minimum+100000,INF);
    for(int i=0;i<NE;i++){
        int s,t,d;
        cin>>s>>t>>d;
        V[s].E.emplace_back(d,t);
    }

    priority_queue<P,vector<P>,greater<P>> que;
    que.emplace(0,r);
    minimum[r]=0;
    while(!que.empty()){
        P p = que.top();que.pop();
        int cost = p.first, from = p.second;
        if(cost>minimum[from]) continue;
        for(auto& e:V[from].E){
            if(cost+e.first<minimum[e.second]){
                minimum[e.second]=cost+e.first;
                que.emplace(cost+e.first,e.second);
            }
        }
    }
    for(int i=0;i<NV;i++){
        if(minimum[i]==INF){
            cout<<"INF"<<endl;
        }else{
            cout<<minimum[i]<<endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'INT_MAX' was not declared in this scope
   10 | #define INF INT_MAX
      |             ^~~~~~~
a.cc:17:33: note: in expansion of macro 'INF'
   17 |     fill(minimum,minimum+100000,INF);
      |                                 ^~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <queue>
  +++ |+#include <climits>
    5 | using namespace std;
Language: C++

#include<iostream>
#include<vector>
#include<utility>
#include<queue>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define INF 100000000
#define MAXV 100000000
using namespace std;
typedef pair<int,int> P;
struct edge{int to,cost;};

int V;
vector<edge> G[MAXV];
int d[MAXV];

void dijkstra(int s){
	priority_queue<P,vector<P>,greater<P> > que;
	fill(d,d+V,INF);
	d[s]=0;
	que.push(P(0,s));
	while(!que.empty()){
		P p=que.top();que.pop();
		int v=p.second;
		if(d[v]<p.first)continue;
		for(int i=0;i<G[v].size();i++){
			edge e=G[v][i];
			if(d[e.to]>d[v]+e.cost){
				d[e.to]=d[v]+e.cost;
				que.push(P(d[e.to],e.to));
			}
		}
	}
}

int main(){
	int r,en,s,t,c;
	edge in;
	cin>>V>>en>>r;
	rep(i,en){
		cin>>s>>t>>c;
		in.to=t;
		in.cost=c;
		G[s].push_back(in);
	}
	dijkstra(r);
	rep(i,V){
		if(d[i]<MAXV)cout<<d[i]<<endl;
		else cout<<"INF"<<endl;
	}
	return 0;
}

Compiler output:
/tmp/cc8jFnmG.o: in function `dijkstra(int)':
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0x47): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0x63): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0xd9): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0x13b): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0x152): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0x172): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0x18e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0x1a5): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
/tmp/cc8jFnmG.o: in function `main':
a.cc:(.text+0x34a): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cc8jFnmG.o
a.cc:(.text+0x368): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<vector>
#include<utility>
#include<queue>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define INF 100000000
#define MAXV 100000000
using namespace std;
typedef pair<int,int> P;
struct edge{int to,cost;};

int V;
vector<edge> G[MAXV];
int d[MAXV];

void dijkstra(int s){
	priority_queue<P,vector<P>,greater<P> > que;
	fill(d,d+V,INF);
	d[s]=0;
	que.push(P(0,s));
	while(!que.empty()){
		P p=que.top();que.pop();
		int v=p.second;
		if(d[v]<p.first)continue;
		for(int i=0;i<G[v].size();i++){
			edge e=G[v][i];
			if(d[e.to]>d[v]+e.cost){
				d[e.to]=d[v]+e.cost;
				que.push(P(d[e.to],e.to));
			}
		}
	}
}

int main(){
	int r,en,s,t,c;
	edge in;
	cin>>V>>en>>r;
	rep(i,en){
		cin>>s>>t>>c;
		in.to=t;
		in.cost=c;
		G[s].push_back(in);
	}
	dijkstra(r);
	rep(i,V){
		if(d[i]<MAXV)cout<<d[i]<<endl;
		else cout<<"INF"<<endl;
	}
	return 0;
}

Compiler output:
/tmp/ccaeTG2K.o: in function `dijkstra(int)':
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0x47): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0x63): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0xd9): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0x13b): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0x152): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0x172): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0x18e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0x1a5): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
/tmp/ccaeTG2K.o: in function `main':
a.cc:(.text+0x34a): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccaeTG2K.o
a.cc:(.text+0x368): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<vector>
#include<utility>
#include<queue>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
#define INF 10000000
using namespace std;
typedef pair<long long,long long> P;
struct edge{long long to,cost;};

long long V;
vector<edge> G[100005];
int d[100005];

void dijkstra(int s){
	priority_queue<P,vector<P>,greater<P> > que;
	fill(d,d+V,INF);
	d[s]=0;
	que.push(P(0,s));
	while(!que.empty()){
		P p=que.top();que.pop();
		long long v=p.second;
		if(d[v]<p.first)continue;
		for(int i=0;i<G[v].size();i++){
			edge e=G[v][i];
			if(d[e.to]>d[v]+e.cost){
				d[e.to]=d[v]+e.cost;
				que.push(P(d[e.to],e.to));
			}
		}
	}
}

int main(){
	long long r,en,s,t,c;
	edge in;
	cin>>V>>en>>r;
	rep(i,en){
		cin>>s>>t>>c;
		in.to=t;
		in.cost=c;
		G[s].push_back(in);
	}
	dijkstra(r);
	rep(i,V){
		if(d[i]<MAXV)cout<<d[i]<<endl;
		else cout<<"INF"<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:25: error: 'MAXV' was not declared in this scope
   47 |                 if(d[i]<MAXV)cout<<d[i]<<endl;
      |                         ^~~~
Language: C++

#include <iostream>
#include <queue>
#include <vector>
#define INF 1000000001
using namespace std;
struct E{
????int rel,cost;
};
vector <E> grh[100000];
int v,e,r;
??
void dijkstra(){
????priority_queue < pair <int,int> > Q;
????int sum = 0;
????int d[100000];
????for(int i=0;i<v;i++) d[i] = INF;
????d[r] = 0;
????Q.push(make_pair(0,r));
??????
????int s,f;
????while(!Q.empty()) {
????????f = Q.top().first;
????????s = Q.top().second;
????????Q.pop();
??????????
??????????
????????for(int i=0;i<grh[s].size();i++) {
????????????E e = grh[s][i];
????????????if(d[e.rel] > e.cost - f) {
????????d[e.rel] = e.cost - f;
????????Q.push(make_pair(-d[e.rel],e.rel));
????????????}
????????}
????}
??
????for(int i=0;i<v;i++) {
????????if(d[i] == INF ) cout << "INF"<<endl;
????????else?? cout << d[i] << endl;
????}
}
??
int main() {
??
????cin >> v >> e >> r; 
????int a,b,c;
????for(int i=0;i<e;i++) {
????????cin >> a >> b>> c;
????????grh[a].push_back((E){b,c});
????}
??????
????dijkstra();
??
????return 0;
??
}?????????? 

Compiler output:
a.cc:7:1: error: expected unqualified-id before '?' token
    7 | ????int rel,cost;
      | ^
a.cc:11:1: error: expected unqualified-id before '?' token
   11 | ??
      | ^
a.cc:41:1: error: expected unqualified-id before '?' token
   41 | ??
      | ^
a.cc:55:2: error: expected unqualified-id before '?' token
   55 | }??????????
      |  ^
Language: C++

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

#define INF 10000000001;

class E{
public:
	int rel, cost;
	E(int rel, int cost){
		this->rel = rel;
		this->cost = cost;
	}
};

vector <E> G[100000];
int main(){	
	int v = 0;//num of vertices
	int e = 0;//num of edges
	int r = 0;//source node
	cin >> v >> e >> r;

	int src, tar, cost;
	for (int i = 0; i < e; i++){
		cin >> src >> tar >> cost;
		G[src].push_back(*(new E(tar, cost)));
	}

	priority_queue <pair<int, int>> PQ;
	int sum = 0;
	int d[100000];//results
	for (int i = 0; i < v; i++){
		d[i] = INF; 
	}
	d[r] = 0;
	PQ.push(make_pair(0, r));

	int s, f;
	while (!PQ.empty()) {

		f = PQ.top().first;//first is the distance 
		s = PQ.top().second;//second is the target node
		PQ.pop();

		for (int i = 0; i < G[s].size(); i++) {
			E e = G[s][i];
			if (d[e.rel] > e.cost - f) {
				d[e.rel] = e.cost - f;
				PQ.push(make_pair(-d[e.rel], e.rel));
			}
		}

	}

	for (int i = 0; i < v; i++) {
		if (d[i] == INF){ 
			cout << "INF" << endl; 
		}else{ 
			cout << d[i] << endl; 
		}

	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000001' to '1410065409' [-Woverflow]
    6 | #define INF 10000000001;
      |             ^~~~~~~~~~~
a.cc:34:24: note: in expansion of macro 'INF'
   34 |                 d[i] = INF;
      |                        ^~~
a.cc:57:32: error: expected primary-expression before ')' token
   57 |                 if (d[i] == INF){
      |                                ^
Language: C++

#include <iostream>
#include <queue>
#include <vector>
#define INF 1000000001
using namespace std;
struct E{
????int rel,cost;
};
vector <E> grh[100000];
int v,e,r;
??
void dijkstra(){
????priority_queue < pair <int,int> > Q;
????int sum = 0;
????int d[100000];
????for(int i=0;i<v;i++) d[i] = INF;
????d[r] = 0;
????Q.push(make_pair(0,r));
??????
????int s,f;
????while(!Q.empty()) {
????????f = Q.top().first;
????????s = Q.top().second;
????????Q.pop();
??????????
??????????
????????for(int i=0;i<grh[s].size();i++) {
????????????E e = grh[s][i];
????????????if(d[e.rel] > e.cost - f) {
????????d[e.rel] = e.cost - f;
????????Q.push(make_pair(-d[e.rel],e.rel));
????????????}
????????}
????}
??
????for(int i=0;i<v;i++) {
????????if(d[i] == INF ) cout << "INF"<<endl;
????????else?? cout << d[i] << endl;
????}
}
??
int main() {
??
????cin >> v >> e >> r; 
????int a,b,c;
????for(int i=0;i<e;i++) {
????????cin >> a >> b>> c;
????????grh[a].push_back((E){b,c});
????}
??????
????dijkstra();
??
????return 0;
??
}??????

Compiler output:
a.cc:7:1: error: expected unqualified-id before '?' token
    7 | ????int rel,cost;
      | ^
a.cc:11:1: error: expected unqualified-id before '?' token
   11 | ??
      | ^
a.cc:41:1: error: expected unqualified-id before '?' token
   41 | ??
      | ^
a.cc:55:2: error: expected unqualified-id before '?' token
   55 | }??????
      |  ^
Language: C++

#include <cstdio>
#define SUPER_LARGE 987654321
int V, E, R, A[100001][100001], MEMO[100001], VISIT[100001];
void input(void);
void init(void);
void initA(void);
int DP(int s, int d);
int main(void){
    //freopen("in.txt", "r", stdin);
    input();
    for(int i = 0; i < V; i++){
        int ans = DP(R, i);
        if (ans == SUPER_LARGE) printf("INF\n");
        else printf("%d\n", ans);
        init();
    }
    return 0;
}
int DP(int s, int d){
    if (VISIT[d] == 1) return MEMO[d];
    VISIT[d] = 1;
    if (d == s) return 0;
    int i, min = SUPER_LARGE;
    for(i = 0; i < V; i++){
        if (A[i][d] != -1){
            int cnd = A[i][d] + DP(s, i);
            if (cnd < min) min = cnd;
        }
    }
    MEMO[d] = min;
    return min;
}
void input(void){
    scanf("%d%d%d", &V, &E, &R);
    initA();
    int i, a, b, w;
    for (i = 0; i < E; i++){
        scanf("%d%d%d", &a, &b, &w);
        A[a][b] = w;
    }
}
void initA(void){
    int i, j;
    for(i = 0; i < V; i++)
        for(j = 0; j < V; j++) A[i][j] = -1;
}
void init(void){
    int i;
    for(i = 0; i < V; i++){
        MEMO[i] = 0;
        VISIT[i] = 0;
    }
}

Compiler output:
/tmp/ccwY5UFt.o: in function `DP(int, int)':
a.cc:(.text+0x98): relocation truncated to fit: R_X86_64_PC32 against symbol `VISIT' defined in .bss section in /tmp/ccwY5UFt.o
a.cc:(.text+0xb4): relocation truncated to fit: R_X86_64_PC32 against symbol `MEMO' defined in .bss section in /tmp/ccwY5UFt.o
a.cc:(.text+0xd0): relocation truncated to fit: R_X86_64_PC32 against symbol `VISIT' defined in .bss section in /tmp/ccwY5UFt.o
a.cc:(.text+0x195): relocation truncated to fit: R_X86_64_PC32 against symbol `MEMO' defined in .bss section in /tmp/ccwY5UFt.o
/tmp/ccwY5UFt.o: in function `init()':
a.cc:(.text+0x2d1): relocation truncated to fit: R_X86_64_PC32 against symbol `MEMO' defined in .bss section in /tmp/ccwY5UFt.o
a.cc:(.text+0x2ec): relocation truncated to fit: R_X86_64_PC32 against symbol `VISIT' defined in .bss section in /tmp/ccwY5UFt.o
collect2: error: ld returned 1 exit status
Language: C++

#include<stdio.h>
#include<algorithm>
#include <map>
#include<stdio.h>
#include<algorithm>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <iostream>
#include <functional>
#include <time.h>
using namespace std;
clock_t fi, endtime;

const int INF = INT_MAX;
const int r_c = 0;
const int r_t = 1;
const int MAX_V = 100000;
const int MAX_E = 500000;

int n, m, a, b, c, t;
int k, p, q, r;
int wf[MAX_V] = { 0 };

struct edge { int from, to, ct; };
edge edg[MAX_E];

int main()
{
	scanf("%d %d %d", &n, &m, &r);
	for (int i = 0; i < m; ++i) {
		scanf("%d %d %d", &a, &b, &c);
		edg[i].from = a; edg[i].to = b; edg[i].ct = c;
	}
	for (int i = 0; i < m; ++i) {
		wf[i] = INF;
	}
	wf[r] = 0;
	while (1) {
		bool bo = false;
		for (int i = 0; i < m; ++i) {
			edge e = edg[i];
			if (wf[e.from] != INF && wf[e.to] > wf[e.from] + e.ct) {
				wf[e.to] = wf[e.from] + e.ct;
				bo = true;
			}
		}
		if (!bo) break;
	}
	for (int i = 0; i < n; ++i) {
		if (wf[i] == INF) printf("INF\n");
		else printf("%d\n", wf[i]);
	}
}

Compiler output:
a.cc:18:17: error: 'INT_MAX' was not declared in this scope
   18 | const int INF = INT_MAX;
      |                 ^~~~~~~
a.cc:14:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   13 | #include <functional>
  +++ |+#include <climits>
   14 | #include <time.h>
Language: C++

#include<stdio.h>
#include<algorithm>
#include <map>
#include<stdio.h>
#include<algorithm>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <iostream>
#include <functional>
#include <time.h>
using namespace std;
clock_t fi, endtime;
const long long int INF = 32767i16;
const int r_c = 0;
const int r_t = 1;
const int MAX_V = 100000;
const int MAX_E = 500000;

int n, m, a, b, c, t;
int k, p, q, r;
long long int wf[MAX_V] = { 0 };

struct edge { int from, to, ct; };
edge edg[MAX_E];

int main()
{
	scanf("%d %d %d", &n, &m, &r);
	for (int i = 0; i < m; ++i) {
		scanf("%d %d %d", &a, &b, &c);
		edg[i].from = a; edg[i].to = b; edg[i].ct = c;
	}
	for (int i = 0; i < n; ++i) {
		wf[i] = INF;
	}
	wf[r] = 0;
	while (1) {
		bool bo = false;
		for (int i = 0; i <= m; ++i) {
			edge e = edg[i];
			if (wf[e.from] != INF && wf[e.to] > wf[e.from] + e.ct) {
				wf[e.to] = wf[e.from] + e.ct;
				bo = true;
			}
		}
		if (!bo) break;
	}
	for (int i = 0; i < n; ++i) {
		if (wf[i] == INF) printf("INF\n");
		else printf("%d\n", wf[i]);
	}
}

Compiler output:
a.cc:17:27: error: unable to find numeric literal operator 'operator""i16'
   17 | const long long int INF = 32767i16;
      |                           ^~~~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
#include <map>
#include<stdio.h>
#include<algorithm>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <vector>
#include <iostream>
#include <functional>
#include <time.h>
using namespace std;
clock_t fi, endtime;
const int r_c = 0;
const int r_t = 1;
const int MAX_V = 100000;
const int MAX_d = 100000;
const int MAX_E = 500000;
const int INF = 500000 * 100000;

int n, m, a, b, c, t;
int k, p, q, r;
long int wf[MAX_V] = { 0 };

struct edge { int from, to, ct; };
edge edg[MAX_E];

int main()
{
	scanf_s("%d %d %d", &n, &m, &r);
	for (int i = 0; i < m; ++i) {
		scanf_s("%d %d %d", &a, &b, &c);
		edg[i].from = a; edg[i].to = b; edg[i].ct = c;
	}
	for (int i = 0; i < n; ++i) {
		wf[i] = INF;
	}
	wf[r] = 0;
	while (1) {
		bool bo = false;
		for (int i = 0; i <= m; ++i) {
			edge e = edg[i];
			if (wf[e.from] != INF && wf[e.to] > wf[e.from] + e.ct) {
				wf[e.to] = wf[e.from] + e.ct;
				bo = true;
			}
		}
		if (!bo) break;
	}
	for (int i = 0; i < n; ++i) {
		if (wf[i] == INF) printf("INF\n");
		else printf("%d\n", wf[i]);
	}
}

Compiler output:
a.cc:22:24: warning: integer overflow in expression of type 'int' results in '-1539607552' [-Woverflow]
   22 | const int INF = 500000 * 100000;
      |                 ~~~~~~~^~~~~~~~
a.cc: In function 'int main()':
a.cc:33:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   33 |         scanf_s("%d %d %d", &n, &m, &r);
      |         ^~~~~~~
      |         scanf