criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;

public class MainC {
  final static int INF = 99999999;
  static int[][] adjArr;
  static int v;
  static int[] shortDist;

  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    v = scan.nextInt();
    int e = scan.nextInt();
    int s = scan.nextInt();

    adjArr = new int[v][v];
    shortDist = new int[v];
    Arrays.fill(shortDist, INF);
    for(int[] i : adjArr) {
      Arrays.fill(i, INF);
    }

    int start;
    int end;
    int weight;
    for(int i = 0 ; i < e; i++) {
      start = scan.nextInt();
      end = scan.nextInt();
      weight = scan.nextInt();
      adjArr[start][end] = weight;
    }

    bellman(s);

    for(int i = 0 ; i < v ; i++) {
      System.out.println(shortDist[i]);
    }
  }

  static void bellman(int s) {
    shortDist[s] = 0;
    for(int i = 0 ; i < v ; i++) {
      for(int j = 0 ; j < v ; j++) {
        for(int k = 0 ; k < v ; k++) {
          if(j == k) continue;
          int wei = adjArr[j][k];
          if(shortDist[j] != INF && shortDist[k] > shortDist[j] + wei) {
            shortDist[k] = shortDist[j] + wei;
            if(i == v-1) {
              return;
            }
          }
        }
      }
    }
  }
}


Compiler output:
Main.java:3: error: class MainC is public, should be declared in a file named MainC.java
public class MainC {
       ^
1 error
Language: Java

import java.util.*;

class Main {
  final static int INF = 99999999;
  static int[][] adjArr;
  static int v;
  static int[] dist;
  static boolean[] visited;

  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    v = scan.nextInt();
    int e = scan.nextInt();
    int s = scan.nextInt();

    adjArr = new int[v][v];
    dist = new int[v];
    visited = new boolean[v];

    Arrays.fill(dist, INF);
    Arrays.fill(visited, false);
    for(int[] i : adjArr) Arrays.fill(i, INF);

    int start;
    int end;
    int weight;
    for(int i = 0 ; i < e; i++) {
      start = scan.nextInt();
      end = scan.nextInt();
      weight = scan.nextInt();
      adjArr[start][end] = weight;
    }

    /*
    for(int i = 0 ; i < v ; i++) {
      for(int j = 0 ; j < v ; j++) {
        System.out.print(adjArr[i][j] + " ");
      }
      System.out.println();
    }
    System.out.println("------------------");*/

    dist[s] = 0;
    dijkstra();

    for(int i = 0 ; i < v ; i++) {
      if(dist[i] == INF) {
        System.out.pritln("INF");
      } else System.out.println(dist[i]);
    }
  }

  static void dijkstra() {
    int shortestDist;
    int shortestPoint = 0;
    for(int i = 0 ; i < v ; i++) {
      shortestDist = INF;
      for(int j = 0 ; j < v ; j++) { // 最小距離調査
        if(visited[j]==false &&  dist[j] < shortestDist) {
          shortestDist = dist[j];
          shortestPoint = j;
        }
      }

      visited[shortestPoint] = true;

      for(int j = 0 ; j < v ; j++) { // 距離設定
        if(dist[shortestPoint] + adjArr[shortestPoint][j] < dist[j]) {
          dist[j] = dist[shortestPoint] + adjArr[shortestPoint][j];
        }
      }
    }
  }
}


Compiler output:
Main.java:48: error: cannot find symbol
        System.out.pritln("INF");
                  ^
  symbol:   method pritln(String)
  location: variable out of type PrintStream
1 error
Language: Java

import java.util.*;

public class MainE {
  final static int INF = 99999999;
  static int[][] adjArr;
  static int v;
  static int[] dist;
  static boolean[] visited;

  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    v = scan.nextInt();
    int e = scan.nextInt();
    int s = scan.nextInt();

    adjArr = new int[v][v];
    dist = new int[v];
    visited = new boolean[v];

    Arrays.fill(dist, INF);
    Arrays.fill(visited, false);
    for(int[] i : adjArr) Arrays.fill(i, INF);

    int start;
    int end;
    int weight;
    for(int i = 0 ; i < e; i++) {
      start = scan.nextInt();
      end = scan.nextInt();
      weight = scan.nextInt();
      adjArr[start][end] = weight;
    }

    /*
    for(int i = 0 ; i < v ; i++) {
      for(int j = 0 ; j < v ; j++) {
        System.out.print(adjArr[i][j] + " ");
      }
      System.out.println();
    }
    System.out.println("------------------");*/

    dist[s] = 0;
    dijkstra();

    for(int i = 0 ; i < v ; i++) {
      if(dist[i] == INF) {
        System.out.println("INF");
      } else System.out.println(dist[i]);
    }
  }

  static void dijkstra() {
    int shortestDist;
    int shortestPoint = 0;
    for(int i = 0 ; i < v ; i++) {
      shortestDist = INF;
      for(int j = 0 ; j < v ; j++) { // 最小距離調査
        if(visited[j]==false &&  dist[j] < shortestDist) {
          shortestDist = dist[j];
          shortestPoint = j;
        }
      }

      visited[shortestPoint] = true;

      for(int j = 0 ; j < v ; j++) { // 距離設定
        if(dist[shortestPoint] + adjArr[shortestPoint][j] < dist[j]) {
          dist[j] = dist[shortestPoint] + adjArr[shortestPoint][j];
        }
      }
    }
  }
}


Compiler output:
Main.java:3: error: class MainE is public, should be declared in a file named MainE.java
public class MainE {
       ^
1 error
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;



class Main{
    class Edge{
        int to,cost;
        Edge(int to,int cost){this.to=to;this.cost=cost;}
    }
    class Node{
        int v,dis;
        Node(int v,int dis){this.v=v;this.dis=dis;}
    }
    List<Edge> edges[];
    int[] d;
    void add_edge(int from,int to,int cost){
        edges[from].add(new Edge(to,cost));
    }
    Dijkstra(int N){
        edges = new ArrayList[N];
        d = new int[N];
        for(int i=0;i<N;++i)edges[i]=new ArrayList<>();
    }
    Dijkstra(int N,int[] from, int[] to,int[] cost){
        edges = new ArrayList[N];
        d = new int[N];
        for(int i=0;i<N;++i)edges[i]=new ArrayList<>();
        for(int i=0;i<from.length;++i)edges[from[i]].add(new Edge(to[i],cost[i]));
    }

    int shortest(int s,int t){
        Arrays.fill(d, Integer.MAX_VALUE);
        d[s]=0;
        PriorityQueue<Node> que = new PriorityQueue<>((a,b)->a.dis-b.dis);
        que.add(new Node(s,0));
        while(!que.isEmpty()){
            Node node = que.poll();
            if(node.dis > d[node.v])continue;
            for(Edge e : edges[node.v]){
                if(d[e.to]<=d[node.v]+e.cost)continue;
                d[e.to]=d[node.v]+e.cost;
                que.add(new Node(e.to, d[e.to]));
            }
        }
        return d[t];
    }



    // AIZU ONLINE JUDGE
    // 単一始点最短経路
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int V = scan.nextInt();
        int E = scan.nextInt();
        int s = scan.nextInt();
        int[] from = new int[E];
        int[] to = new int[E];
        int[] c = new int[E];
        for(int i=0;i<E;++i){
            from[i]=scan.nextInt();
            to[i]=scan.nextInt();
            c[i]=scan.nextInt();
        }
        Dijkstra dijkstra = new Dijkstra(V, from, to, c);
        dijkstra.shortest(s, 0);
        for(int i=0;i<V;++i)System.out.println((dijkstra.d[i]<Integer.MAX_VALUE ? String.valueOf(dijkstra.d[i]):"INF"));
    }

}


Compiler output:
Main.java:23: error: invalid method declaration; return type required
    Dijkstra(int N){
    ^
Main.java:28: error: invalid method declaration; return type required
    Dijkstra(int N,int[] from, int[] to,int[] cost){
    ^
2 errors
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;



class Dijkstra{
    class Edge{
        int to,cost;
        Edge(int to,int cost){this.to=to;this.cost=cost;}
    }
    class Node{
        int v,dis;
        Node(int v,int dis){this.v=v;this.dis=dis;}
    }
    List<Edge> edges[];
    int[] d;
    void add_edge(int from,int to,int cost){
        edges[from].add(new Edge(to,cost));
    }
    Dijkstra(int N){
        edges = new ArrayList[N];
        d = new int[N];
        for(int i=0;i<N;++i)edges[i]=new ArrayList<>();
    }
    Dijkstra(int N,int[] from, int[] to,int[] cost){
        edges = new ArrayList[N];
        d = new int[N];
        for(int i=0;i<N;++i)edges[i]=new ArrayList<>();
        for(int i=0;i<from.length;++i)edges[from[i]].add(new Edge(to[i],cost[i]));
    }

    int shortest(int s,int t){
        Arrays.fill(d, Integer.MAX_VALUE);
        d[s]=0;
        PriorityQueue<Node> que = new PriorityQueue<>((a,b)->a.dis-b.dis);
        que.add(new Node(s,0));
        while(!que.isEmpty()){
            Node node = que.poll();
            if(node.dis > d[node.v])continue;
            for(Edge e : edges[node.v]){
                if(d[e.to]<=d[node.v]+e.cost)continue;
                d[e.to]=d[node.v]+e.cost;
                que.add(new Node(e.to, d[e.to]));
            }
        }
        return d[t];
    }



    // AIZU ONLINE JUDGE
    // 単一始点最短経路
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int V = scan.nextInt();
        int E = scan.nextInt();
        int s = scan.nextInt();
        int[] from = new int[E];
        int[] to = new int[E];
        int[] c = new int[E];
        for(int i=0;i<E;++i){
            from[i]=scan.nextInt();
            to[i]=scan.nextInt();
            c[i]=scan.nextInt();
        }
        Dijkstra dijkstra = new Dijkstra(V, from, to, c);
        dijkstra.shortest(s, 0);
        for(int i=0;i<V;++i)System.out.println((dijkstra.d[i]<Integer.MAX_VALUE ? String.valueOf(dijkstra.d[i]):"INF"));
    }

}


Compiler output:
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
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:
main.c:53:1: error: expected identifier or '(' before '}' token
   53 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#define LARGE 100000
#define INF 2100000000
#define MIN(a, b) ((a) < (b) ? (a) : (b))

typedef struct edge{
	int to_node;
	int cost;
	struct edge *next;
}edge;

typedef struct node{
	int cost;
	int flg;
}node;

int V;
node N[LARGE];
edge* E[LARGE];


edge * Make_Edge(int t,int d){
	edge *new=malloc(sizeof(edge));
	new->to_node=t;
	new->cost=d;
	new->next=NULL;
	return new;
}

void Insert(int s,edge* new){
	edge **p=&E[s];

	while((*p)!=NULL){
		p=&((*p)->next);
	}
	(*p)=new;
	
	return;
}


void Dijkstra(int start,int d){
	int min_idx=-1;
	int min=INF+1;
	int i;
	edge *p;
	
	if(d==V-1)return;
	
	if(d==0){
		N[start].cost=0;
		N[start].flg=1;
	}
	
	
	p=E[start];
	
	while(p!=NULL){
		if(N[p->to_node].flg==0){
			if(N[p->to_node].cost > N[start].cost+(p->cost)){
				N[p->to_node].cost=N[start].cost+(p->cost);
				if(min > N[p->to_node].cost){
					min=N[p->to_node].cost;
					min_idx=p->to_node;
				}
			}
		}
		p=p->next;
	}
	
	if(min_idx==-1){
		for(i=0;i<V;i++){
		if(N[i].flg==0){
			min_idx=i;
			break;
		}
		
	}
	
	
	N[min_idx].flg=1;
	
	Dijkstra(min_idx,d+1);
	
	return;
	
}


int main(){
	int start;
	int s,t,d;
	int n,e;
	int i,j;
	edge* new;
	
	scanf("%d %d %d",&V,&e,&start);
	
	/*初期化*/
	for(i=0;i<V;i++){
		E[i]=NULL;
		N[i].cost=INF;
		N[i].flg=0;
	}
	
	/*隣接リスト作成*/
	for(i=0;i<e;i++){
		scanf("%d %d %d",&s,&t,&d);
		new=Make_Edge(t,d);
		Insert(s,new);
	}
	if(e==0)N[start].cost=0;
	
	Dijkstra(start,0);
	
	for(i=0;i<V;i++){
		if(N[i].cost==INF)printf("INF\n");
		else printf("%d\n",N[i].cost);
	}
	
	return 0;
}


Compiler output:
main.c: In function 'Dijkstra':
main.c:123:1: error: expected declaration or statement at end of input
  123 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#define LARGE 100000
#define INF 2000000000
#define MIN(a, b) ((a) < (b) ? (a) : (b))

int V,E;

int heap_id[LARGE];
int id_heap[LARGE];

typedef struct list{
	int id;
	int cost;
	struct list *next;
}list;

typedef struct node{
	int id;
	int cost;
}node;

void Make_AdjList(list* L[],int s,int t,int d){
	list *new=malloc(sizeof(list));
	list **p=&L[s];
	/*card作成*/
	new->id=t;	new->cost=d;  new->next=NULL;
	
	while((*p)!=NULL)p=&((*p)->next);
	(*p)=new;
	
	return;
}

void swap(int x,int y){
	int temp;

	temp=heap_id[x];
	heap_id[x]=heap_id[y];
	heap_id[y]=temp;
	
	temp=id_heap[heap_id[x]];
	id_heap[heap_id[x]]=id_heap[heap_id[y]];
	id_heap[heap_id[y]]=temp;
	
	return;
}

int check(int i,int num){
	if(num%2==1){
		if((num-1)/2<=i && i<num)return 0;
	}
	else {
		if(num/2 <=i && i<num)return 0;
	}
	
	return 1;
}

void heap_updata(node N[],int i,int num){
	
	
	while(i>=0){
	
		if(i==0){
			if(N[heap_id[1]].cost <N[heap_id[2]].cost){
				if(N[heap_id[0]].cost > N[heap_id[1]].cost){
					swap(0,1);
					i=MIN(1,num-1);
				}
				else break;
			}
			else {
				if(N[heap_id[0]].cost > N[heap_id[2]].cost){
					swap(0,2);
					i=MIN(2,num-1);
				}
				else break;
			}
				
				
		else if(i%2==0){
			if(N[heap_id[i]].cost < N[heap_id[i/2-1]].cost){
				swap(i,i/2-1);
				if(check(i,num))i=MIN(i*2+2,num-1);
			}
			else i--;
		}else {
			if(N[heap_id[i]].cost < N[heap_id[i/2]].cost){
				swap(i,i/2);
				if(check(i,num))i=MIN(i*2+2,num-1);
			}
			else i--;
		}
	}
	
	return;

}


int Dijkstra(list* L[],node N[],int num){
	int u=heap_id[0];
	list *p=L[u];
	
	swap(0,num-1);
	num--;
	/*heap_updata(N,num-1,num);*/
	
	while(p!=NULL){
		if(N[p->id].cost > N[u].cost+(p->cost)){
			N[p->id].cost=N[u].cost+(p->cost);
			heap_updata(N,id_heap[p->id],num);
		}
		p=p->next;
	}
	
	return num;
	
}

int main(){
	int i,j;
	int s,t,d;
	int num,start;
	list *L[LARGE];
	node N[LARGE];
	
	scanf("%d %d %d",&V,&E,&start);
	num=V;
	
	for(i=0;i<V;i++){
		L[i]=NULL;
		N[i].id=i;
		N[i].cost=INF;
		heap_id[i]=i;
		id_heap[i]=i;
	}
	N[start].cost=0;
	swap(0,start);
	
	for(i=0;i<E;i++){
		scanf("%d %d %d",&s,&t,&d);
		Make_AdjList(L,s,t,d);
	}
	
	while(num!=0){
		num=Dijkstra(L,N,num);
	}
	
	for(i=0;i<V;i++){
		if(N[i].cost==INF)printf("INF\n");
		else printf("%d\n",N[i].cost);
	}
	
	return 0;
	
}


Compiler output:
main.c: In function 'heap_updata':
main.c:82:17: error: expected '}' before 'else'
   82 |                 else if(i%2==0){
      |                 ^~~~
Language: C

#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> P;
static const int INF=1<<24;


struct ED{
	int s,t,d;
};

bool operator<(ED a,ED b){
	return a.d>b.d;
}


int main(){
	int V,E,r,s,t,d;
	vector<vector<ED> > v(100010);
	int vmin[100010];
	int vis[100010];
	priority_queue<ED> pq;
	cin>>V>>E>>r;
	rep(i,E){
		cin>>s>>t>>d;
		ED t1,t2;
		t1.s=s; t1.t=t; t1.d=d;
		t2.s=t; t2.t=s; t2.d=d;
		v[s].PB(t1);
		v[t].PB(t2);
	}
	rep(i,100010){
		vmin[i]=INT_MAX;
		vis[i]=0;
	}
	vmin[r]=0;
	vis[r]=1;
	rep(i,v[r].size()){
		pq.push(v[r][i]);
	}
	
	while(!pq.empty()){
		ED tmp=pq.top();
		pq.pop();
		//cout<<"tmp "<<tmp.s<<" "<<tmp.t<<" "<<tmp.d<<endl;
		vmin[tmp.t]=min(vmin[tmp.s]+tmp.d,vmin[tmp.t]);
		vis[tmp.t]=1;
		//cout<<tmp.t<<endl;
		rep(i,v[tmp.t].size()){
			//cout<<vis[v[tmp.t][i].t]<<endl;
			if(vis[v[tmp.t][i].t]==0){
				//cout<<"hoge\n";
				pq.push(v[tmp.t][i]);
				//cout<<"v "<<v[tmp.t][i].s<<" "<<v[tmp.t][i].t<<" "<<v[tmp.t][i].d<<endl;
			}
		}
	}
	rep(i,100010){
		if(vis[i]==1){
			cout<<vmin[i]<<endl;
		}
	}
	 return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define pb push_back
using namespace std;
const int maxn=100005;

struct edge{int to,cost;};

int n,m,s;
int d[maxn];
int qh,qt,q[maxn];
bool ok=1,inq[maxn];
vector<edge>G[maxn];

int main() {
	cin>>n>>m>>s;
	for (int i=0;i<m;i++) {
		int u,v,w; cin>>u>>v>>w;
		G[u].pb(edge{v,w});
	}
	memset(d,0x3f,sizeof(d));
	d[s]=0;
	q[qt++]=s; inq[s]=1;
	while (qh!=qt) {
		int u=q[qh++]; if (qh>=maxn) qh=0;
		inq[u]=0;
		for (edge e:G[u]) {
			if (d[e.to]>d[u]+e.cost) {
				d[e.to]=d[u]+e.cost;
				if (!inq[e.to]) {
					q[qt++]=e.to; if (qt>=maxn) qt=0;
					inq[e.to]=1;
				}
			}
		}
	}
    for (int i=0;i<n;i++) 
		if (d[i]==INF) cout<<"INF"<<'\n';
		else cout<<d[i]<<'\n';
}



Compiler output:
a.cc: In function 'int main()':
a.cc:37:27: error: 'INF' was not declared in this scope
   37 |                 if (d[i]==INF) cout<<"INF"<<'\n';
      |                           ^~~
Language: C++

#include<iostream>

using namespace std;

const int MAX_V=1e5;
long long cost[MAX_V][MAX_V];
long long d[MAX_V];
bool used[MAX_V];
int V;
const long long INF = 1e18;

void dijkstra(int s){
    fill(d,d+V,INF);
    fill(used,used+V,false);
    d[s]=0;
    
    while(true){
        int v=-1;
        
        for(int u=0;u<V;u++){
            if(!used[u]&&(v==-1||d[u]<d[v]))v=u;
        }
        
        if(v==-1)break;
        used[v]=true;
        for(int u=0;u<V;u++){
            d[u]=min(d[u],d[v]+cost[v][u]);
        }
    }
}

int main(){
    int E;
    cin>>V>>E;
    int r;
    cin>>r;
    int ss,t,dd;
    for(int i=0;i<V;i++){
        for(int j=0;j<V;j++){
            cost[i][j]=INF;
        }
    }
    for(int i=0;i<E;i++){
        cin>>ss>>t>>dd;
        cost[ss][t]=dd;
    }
    dijkstra(r);
    for(int i=0;i<V;i++){
        if(d[i]==INF)cout<<"INF"<<endl;
        else cout<<d[i]<<endl;
    }
    
    return 0;
}


Compiler output:
/tmp/ccMwcdXZ.o: in function `dijkstra(int)':
a.cc:(.text+0xd): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0x1e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0x32): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0x44): relocation truncated to fit: R_X86_64_PC32 against symbol `V' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0x4d): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0x62): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0x7e): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0xa2): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0xc7): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0xdf): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/ccMwcdXZ.o
a.cc:(.text+0xf8): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#define UNSEEN 1000000001;

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

int main() {
  int n, m, source;
  cin >> n >> m >> source;
  vector<map<int, int>> adj(100000);

  vector<int> d(100000, UNSEEN);
  bool visited[100000];
  int n_visited = 0;

  for (int u, v, len; cin >> u >> v >> len;) {
    adj[u][v] = len;
  }

  auto cmp = [&](int s, int t) { return d[s] > d[t]; };
  priority_queue<int, vector<int>, decltype(cmp)> q(cmp);

  d[source] = 0;
  q.push(source);
  while (!q.empty() and n_visited < n) {
    auto u = q.top();
    q.pop();
    if (visited[u])
      continue;
    ++n_visited;
    visited[u] = true;
    for (auto &kv : adj[u]) {
      d[kv.first] = min(d[kv.first], d[u] + kv.second);
      q.push(kv.first);
    }
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:1:26: error: expected ')' before ';' token
    1 | #define UNSEEN 1000000001;
      |                          ^
a.cc:15:25: note: in expansion of macro 'UNSEEN'
   15 |   vector<int> d(100000, UNSEEN);
      |                         ^~~~~~
a.cc:15:16: note: to match this '('
   15 |   vector<int> d(100000, UNSEEN);
      |                ^
a.cc:15:31: error: expected primary-expression before ')' token
   15 |   vector<int> d(100000, UNSEEN);
      |                               ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;
typedef long long  ll;
#define rep(i,s,n)for(ll i=s;i<n;i++)
#define repe(i,s,n)for(ll i=s;i<=n;i++)

static const ll MOD = 1e9 + 7;
static const ll INF = (ll)1 << 62;
static const ll MAX_N = 100001;
static const ll MAX_M = 100001;

struct edge {
	ll to, cost;
};
typedef pair<ll, ll> P;
vector<edge> G[MAX_N];
ll V;
ll d[MAX_N];

//???
priority_queue<P, vector<P>, greater<P>> que;

void dijkstra(ll s) {
	fill(d, d + V, INF);
	d[s] = 0;
	que.push(P(0, s));
	while (!que.empty()) {
		P p = que.top(); que.pop();
		ll v = p.second;
		if (d[v] < p.first) continue;
		rep(i, 0, G[v].size()) {
			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() {
	ll E, r;
	cin >> V >> E >> r;
	rep(i, 0, E) {
		ll s, t, d; cin >> s >> t >> d;
		G[s].push_back(*(new edge{ t,d }));
	}
	dijkstra(r);

	rep(i, 0, V) {
		ifjavascript:void(0) (d[i] == INF)  cout << "INF" << endl;
		else cout << d[i] << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:38: error: void value not ignored as it ought to be
   54 |                 ifjavascript:void(0) (d[i] == INF)  cout << "INF" << endl;
      |                              ~~~~~~~~^~~~~~~~~~~~~
a.cc:55:17: error: 'else' without a previous 'if'
   55 |                 else cout << d[i] << endl;
      |                 ^~~~
Language: C++

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

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i,n) for(int i=0;i<(int)n;++i)

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

template < typename T >
void vprint(T &v){
	REP(i, v.size()){
		cout << v[i] << " ";
	}
	cout << endl;
}

struct Edge{
    ll dst;
    ll weight;
    Edge(ll dst, ll weight): dst(dst), weight(weight) {}
};

struct TmpDist{
    ll vertex;
    ll dist;
    TmpDist(ll vertex, ll dist): vertex(vertex), dist(dist) {}
    bool operator< (const TmpDist& right)const{
        return dist > right.dist;
    }
};

typedef vector<Edge> Edges;
typedef vector<Edges> Graph;
const ll INFLL = LLONG_MAX/3;

vector<ll> dijkstra(Graph &G, ll r){
    ll V = G.size();
    vector<ll> dist(V, INFLL);
    priority_queue<TmpDist> pq;
    vector<bool> check(V, false);
    TmpDist init(r, 0);
    pq.push(init);
    while(!pq.empty()){
        TmpDist td = pq.top();pq.pop();
        ll now = td.vertex;
        if(!check[now]){
            check[now] = true;
            dist[now] = td.dist;
            for (int i=0;i<G[now].size();i++){
                if(dist[G[now][i].dst] > td.dist + G[now][i].weight){
                    TmpDist tdCandidate(G[now][i].dst, td.dist + G[now][i].weight);
                    pq.push(tdCandidate);
                }
            }
        }
    }
    return dist;
}

int main(){
    ll V, E, r;
    cin >> V >> E >> r;
    Graph G(V);
    ll s, t, w;
    for(int i=0;i<E;i++){
        cin >> s >> t >> w;
        Edge e(t, w);
        G[s].push_back(e);
    }

    vector<ll> dist = dijkstra(G, r);
    for (int i=0;i<V;i++){
        if(dist[i] == INFINT) cout << "INF" << endl;
        else cout << dist[i] << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:80:23: error: 'INFINT' was not declared in this scope; did you mean 'INFINITY'?
   80 |         if(dist[i] == INFINT) cout << "INF" << endl;
      |                       ^~~~~~
      |                       INFINITY
Language: C++

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

struct Edge { int to, cost; }

typedef vector<Edge> Edges;
typedef vector<Edges> Graph;

typedef pair<int, int> Pii;

int const INF = INT_MAX/4;

Graph G;

int main() {
  
  int V, E, r; cin >> V >> E >> r;
  G.resize(V);
  for(int i=0; i<E; i++) {
    int s, t, d; cin >> s >> t >> d;
    Graph[s].push_back((Edge){t, d});
  }

  int dist[N]; fill(dist, dist+N, INF);
  dist[r] = 0;
  priority_queue<Pii> pq;
  pq.push(Pii(0, r));
  while(!pq.empty()) {
    const Pii pii = pq.top(); pq.pop();
    const int cost = pii.first;
    const int now = pii.second;
    for(int i=0; i<G[now].size(); i++) {
      const int next = G[now][i].to;
      if(dist[next] > cost+G[now][i].cost) {
        dist[next] = cost+G[now][i].cost;
        pq.push(Pii(dist[next], next));
      }
    }
  }
  
  for(int i=0; i<V; i++) {
    if(dist[i] == INF) cout << "INF" << endl;
    else cout << dist[i] << endl;
  }
  
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: bits/stc++.h: No such file or directory
    1 | #include <bits/stc++.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

struct Edge { int to, cost; };

typedef vector<Edge> Edges;
typedef vector<Edges> Graph;

typedef pair<int, int> Pii;

int const INF = INT_MAX/4;

Graph G;

int main() {
  
  int V, E, r; cin >> V >> E >> r;
  G.resize(V);
  for(int i=0; i<E; i++) {
    int s, t, d; cin >> s >> t >> d;
    Graph[s].push_back((Edge){t, d});
  }

  int dist[N]; fill(dist, dist+N, INF);
  dist[r] = 0;
  priority_queue<Pii> pq;
  pq.push(Pii(0, r));
  while(!pq.empty()) {
    const Pii pii = pq.top(); pq.pop();
    const int cost = pii.first;
    const int now = pii.second;
    for(int i=0; i<G[now].size(); i++) {
      const int next = G[now][i].to;
      if(dist[next] > cost+G[now][i].cost) {
        dist[next] = cost+G[now][i].cost;
        pq.push(Pii(dist[next], next));
      }
    }
  }
  
  for(int i=0; i<V; i++) {
    if(dist[i] == INF) cout << "INF" << endl;
    else cout << dist[i] << endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:10: error: structured binding declaration cannot have type 'Graph' {aka 'std::vector<std::vector<Edge> >'}
   21 |     Graph[s].push_back((Edge){t, d});
      |          ^~~
a.cc:21:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:21:11: error: conflicting declaration 'auto s'
   21 |     Graph[s].push_back((Edge){t, d});
      |           ^
a.cc:20:9: note: previous declaration as 'int s'
   20 |     int s, t, d; cin >> s >> t >> d;
      |         ^
a.cc:21:13: error: expected initializer before '.' token
   21 |     Graph[s].push_back((Edge){t, d});
      |             ^
a.cc:21:36: error: expected primary-expression before ')' token
   21 |     Graph[s].push_back((Edge){t, d});
      |                                    ^
a.cc:24:12: error: 'N' was not declared in this scope
   24 |   int dist[N]; fill(dist, dist+N, INF);
      |            ^
a.cc:24:21: error: 'dist' was not declared in this scope
   24 |   int dist[N]; fill(dist, dist+N, INF);
      |                     ^~~~
Language: C++

#include <cstdio>
#include <vector>
#include <queue>
using namespace std;
#define PB push_back
typedef pair<int,int> P;

int main(){
    int V,E,r;
    scanf("%d%d%d",&V,&E,&r);
    vector<vector<pair<int,int>>> edges(V);
    for(int i=0;i<E;i++){
        int s,t,d;
        scanf("%d%d%d",&s,&t,&d);
        edges[s].PB(P(t,d));
    }
    vector<int> dist(V,INT_MAX);
    dist[r]=0;
    priority_queue<P,vector<P>,greater<P>> pq;
    pq.push(P(0,r));
    while(!pq.empty()){
        P now=pq.top();pq.pop();
        int nd=now.first,nat=now.second;
        if(dist[nat]<nd) continue;
        for(int i=0;i<edges[nat].size();i++){
            int ned=nd+edges[nat][i].second,neat=edges[nat][i].first;
            if(ned < dist[neat]){
                dist[neat]=ned;
                pq.push(P(ned,neat));
            }
        }
    }
    for(int i=0;i<V;i++){
        if(dist[i]==INT_MAX) printf("INF\n");
        else printf("%d\n",dist[i]);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: 'INT_MAX' was not declared in this scope
   17 |     vector<int> dist(V,INT_MAX);
      |                        ^~~~~~~
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<iostream>
#include<vector>
using namespace std;

typedef pair<int, int>vd;	//(頂点,距離)

int main(){
	int V,E,r;
	cin >> V >> E >> r;

	vector<int> dist(V,INT_MAX);	// r からの距離

	vector< vector<vd>> adj(V);	// 隣接する点のリスト(頂点ごと)

	for (int e = 0; e < E; e++){
		int s, t, d;
		cin >> s >> t >> d;
		adj[s].push_back(vd(t, d));
	}//辺情報読み込み


	vector<bool> Defined(V,false);
	vector<bool> Reach(V, false);

	dist[r] = 0;
	Reach[r] = true;
	Defined[r] = true;

	for (int i = 0; i < adj[r].size(); ++i){
		dist[adj[r][i].first] = adj[r][i].second;
		Reach[adj[r][i].first] = true;
	}

	int num = 0;
	while (num >= 0){
		num = -1;
		int min = INT_MAX;
		for (int i = 0; i < V; ++i){
			if (!Defined[i] && Reach[i] && dist[i] < min){
				min = dist[i];
				num = i;
			}
		}
		if (num >= 0){
			for (int i = 0; i < adj[num].size(); ++i){
				if (!Defined[adj[num][i].first] && dist[num] + adj[num][i].second < dist[adj[num][i].first]){
					dist[adj[num][i].first] = dist[num] + adj[num][i].second;
					Reach[adj[num][i].first] = true;
				}
			}
			Defined[num] = true;
		}
		
	}

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: 'INT_MAX' was not declared in this scope
   11 |         vector<int> dist(V,INT_MAX);    // r からの距離
      |                            ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<vector>
  +++ |+#include <climits>
    3 | using namespace std;
Language: C++

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


const int IINF = INT_MAX;
typedef pair<int, int>vd;


int main(){
	int V,E,r;
	cin >> V >> E >> r;

	vector<int> dist(V,IINF);

	vector< vector<vd>> adj(V);

	for (int e = 0; e < E; e++){
		int s, t, d;
		cin >> s >> t >> d;
		adj[s].push_back(vd(t, d));
	}//辺情報読み込み


	vector<bool> Defined(V,false);
	vector<bool> Reach(V, false);

	dist[r] = 0;
	Reach[r] = true;
	Defined[r] = true;

	for (int i = 0; i < adj[r].size(); ++i){
		dist[adj[r][i].first] = adj[r][i].second;
		Reach[adj[r][i].first] = true;
	}

	int num = 0;
	while (num >= 0){
		num = -1;
		int min = IINF;
		for (int i = 0; i < V; ++i){
			if (!Defined[i] && Reach[i] && dist[i] < min){
				min = dist[i];
				num = i;
			}
		}
		if (num >= 0){
			for (int i = 0; i < adj[num].size(); ++i){
				if (!Defined[adj[num][i].first] && dist[num] + adj[num][i].second < dist[adj[num][i].first]){
					dist[adj[num][i].first] = dist[num] + adj[num][i].second;
					Reach[adj[num][i].first] = true;
				}
			}
			Defined[num] = true;
		}
		
	}

	for (int i = 0; i < V; i++){
		if (Reach[i]){
			cout << dist[i] << endl;
		}
		else{
			cout << "INF" << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc:6:18: error: 'INT_MAX' was not declared in this scope
    6 | const int IINF = INT_MAX;
      |                  ^~~~~~~
a.cc:3:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include<vector>
  +++ |+#include <climits>
    3 | using namespace std;
Language: C++

#include<cstdio>
#include<cstring>
#include<queue>
#include<algorithm>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)

typedef long long int lli;
typedef pair<lli,int> mp;

int n,m,st;
vector<mp> vs[100005];//グラフの情報を持つ
lli dist[100005];//距離を持つ

int main(void){
	scanf("%d%d%d",&n,&m,&st);
	rep(i,m){
		int a,b;
		lli c;
		scanf("%d%d%lld",&a,&b,&c);
		vs[a].push_back( mp(c,b) );
	}
	
	memset(dist,-1,sizeof(dist));//最初は、無限大で初期化
	
	priority_queue<mp,vector<mp>,greater<mp> > que;
	
	que.push(mp(0,st));//stには0で行ける
	
	while(!que.empty()){//queが空になるまでやる
		
		mp pa = que.top();
		que.pop();
		//queの先頭要素(一番軽いの)を取り出す。
		
		int no = pa.second;//今の頂点
		lli co = pa.first;//今の距離
		
		if(dist[no]!=-1)continue; //もし、すでに確定していたら、飛ばす
		
		dist[no] = co;//確定させる
		
		rep(i,vs[no].size()){//今の地点から出ているすべての辺の先について、キューに突っ込んでいく
			int to = vs[no][i].sec;//次の頂点
			lli tc = co + vs[no][i].sec;//次の距離
			
			if(dist[to]!=-1)continue; //もし、すでに確定していたら、飛ばす
			que.push( mp(tc,to) ); //queに追加
		}
	}
	//これで、全ての頂点について、stからの距離が求まった
	
	
	rep(i,n){
		if(dist[i]==-1)printf("INF\n");//もし-1なら、その頂点には到達不可能
		else printf("%lld\n",dist[i]);//そうでなければ、距離を出力
	}
	
	return 0;
}
	
	
	
	

Compiler output:
a.cc: In function 'int main()':
a.cc:44:44: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, int> >, std::pair<long long int, int> >::value_type' {aka 'struct std::pair<long long int, int>'} has no member named 'sec'
   44 |                         int to = vs[no][i].sec;//次の頂点
      |                                            ^~~
a.cc:45:49: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, int> >, std::pair<long long int, int> >::value_type' {aka 'struct std::pair<long long int, int>'} has no member named 'sec'
   45 |                         lli tc = co + vs[no][i].sec;//次の距離
      |                                                 ^~~
Language: C++

#include<vector>
#include<cstdio>
#include<utility>
using namespace std;
typedef pair<int, int> P;
vector<vector<P> > G;
vector<int> d;
int min(int a, int b) {
	if (a == -1) return b;
	if (b == -1) return a;
	if (a < b) return a;
	return b;
}
void dijkstra(int s) {
	int N = G.size();
	d.resize(N);
	for (int i = 0; i < N; i ++) d[i] = -1;
	vector<bool> visited(N, false);
	d[s] = 0;
	while (true) {
		int v = -1; int min_d = -1;
		for (int i = 0; i < N; i ++) {
			if (visited[i]) continue;
			if (v == -1 || min(d[i], min_d) != min_d) {
				v = i; min_d = d[i];
			}
		}
		if (v == -1) break;
		visited[v] = true;
		if (d[v] != -1)
			for (int i = 0; i < int (G[v].size()); i ++) {
				P e = G[v][i];
				int e_next = e.first;
				int e_cost = e.second;
				d[e_next] = min(d[e_next], d[v] + e_cost);
			}
		}
	}
}
int main() {
	int V, E, r;
	scanf("%d %d %d", &V, &E, &r);
	G.resize(V);
	for (int i = 0; i < E; i ++) {
		int a, b, c;
		scanf("%d %d %d", &a, &b, &c);
		G[a].push_back(make_pair(b, c));
	}
	dijkstra(r);
	for (int i = 0; i < V; i ++) {
		if (d[i] == -1) printf("INF\n");
		else printf("%d\n", d[i]);
	}
	return 0;
}

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

#include <iostream>
#include <cstdio>
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]=inf;
    }else{
      c[i] = 0;
    }
  }
  // for (int t = 0; t < V; ++t)//Vは街の数
  while(true)
  {
    bool update = false;
    for (int i = 0; i < E; ++i)//Eは辺の数
    {
      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 i = 0; i < V; ++i)
  {
    if (inf==C[i])
    {
      cout <<"INF"<<endl;
    }else{
      cout <<C[i]<<endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:7: error: 'c' was not declared in this scope
   22 |       c[i] = 0;
      |       ^
Language: C++

#include<cstdio>
#include<queue>

using namespace std;
#define REP(i,j) for(int i=0;i<(j);i++)

#define MAX_V 100000
#define INF -1


struct edge{int to,cost;};
typedef pair<int,int> P;//first:Minimum distance/second:Vertex number

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


void dij(int s){
//use greater<P> to pop minimum struct in the P-queue
	priority_queue<P,vector<P>,greater<P> >que;
	fill(d,d+V,INF);//insted of "for"loop
	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;
		REP(i,G[v].size()){
			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 s,E;
	scanf("%d%d%d",&V,&E,&s);
	REP(i,E){
		int rs,rt,rd;
		scanf("%d%d%d",&rs,&rt,&rd);
		G[rs].push_back(edge(rt,rd));
	}
	dij(s);
	REP(i,E){
		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:47:43: error: no matching function for call to 'edge::edge(int&, int&)'
   47 |                 G[rs].push_back(edge(rt,rd));
      |                                           ^
a.cc:11:8: note: candidate: 'edge::edge()'
   11 | struct edge{int to,cost;};
      |        ^~~~
a.cc:11:8: note:   candidate expects 0 arguments, 2 provided
a.cc:11:8: note: candidate: 'constexpr edge::edge(const edge&)'
a.cc:11:8: note:   candidate expects 1 argument, 2 provided
a.cc:11:8: note: candidate: 'constexpr edge::edge(edge&&)'
a.cc:11:8: note:   candidate expects 1 argument, 2 provided
Language: C++

#include<cstdio>
#include<queue>

using namespace std;
#define REP(i,j) for(int i=0;i<(j);i++)

#define MAX_V 100000
#define INF 100000000

struct edge{ int to, cost; };//to,cost
typedef pair<int,int> P;//first:Minimum distance/second:Vertex number

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


void dij(int s){
//use greater<P> to pop minimum struct in the P-queue
	priority_queue<P,vector<P>,greater<P> >que;
	fill(d,d+V,INF);//insted of "for"loop
	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;
		REP(i,G[v].size()){
			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 s,E;
	scanf("%d%d%d",&V,&E,&s);
	REP(i,E){
		int rs,rt,rd;
		scanf("%d%d%d",&rs,&rt,&rd);
		edge ine={rt,rd};
		G[rs].push_back(ine);
	}
	dij(s);
	REP(i,V){
		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:51:25: error: expected primary-expression before '>' token
   51 |                 if(d[i]=>INF)
      |                         ^
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<algorithm>
#include<functional>
#include<cmath>
using namespace std;
#define P pair<int,int>
int V,E;
struct edge{int to,cost;};
vector<edge>G[110000];
int ans[110000];
const int INF=pow(2,30);
int main(){
	fill(ans,ans+100000,INF);
	int r;
	cin>>V>>E>>r;
	for(int i=0;i<E;i++){
	int s,t,d;
	cin>>s>>t>>d;
	edge tmp;
	tmp.to=t,tmp.cost=d;
	G[s].push_back(tmp);
	}
	ans[r]=0;
	priority_queue<P,vector<P>,greater<P> >que;
	que.push(make_pair(0,r));//距離、番号
	while(true){
		if(que.size()==0)break;
		//for(int i=0;i<V;i++)cout<<ans[i]<<" ";cout<<" ";
		P tmp=que.top();//ここで使われていないものの中で最も距離が小さい頂点vの番号を求める
		que.pop();
		//cout<<tmp.first<<" "<<tmp.second<<endl;
		if(ans[v]<tmp.first)continue;
		int v=tmp.second;
		for(int i=0;i<G[v].size();i++){
			if(ans[G[v][i].to]>ans[v]+G[v][i].cost){
			ans[G[v][i].to]=ans[v]+G[v][i].cost;
			que.push(make_pair(ans[i],G[v][i].to));
			}
		}
	}
	for(int i=0;i<V;i++){
	if(ans[i]==INF)cout<<"INF"<<endl;
	else cout<<ans[i]<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:24: error: 'v' was not declared in this scope
   34 |                 if(ans[v]<tmp.first)continue;
      |                        ^
Language: C++

int main() {
	
int e ,v,r;
cin>>v>>e>>r;
int tyo[1000];
bool che[1000];
for(int q=0;q<v;q++){
tyo[q]=100000;
che[q]=0;
}
che[r]=1;
tyo[r]=0;
int rin[1000][1000];
for(int j=0;j<v;j++){
	for(int jj=0;jj<v;jj++){
		rin[j][jj]=-1;
	}
}
for(int j=0;j<e;j++){
	int sta,gol,kyo;
	cin>>sta>>gol>>kyo;
	rin[sta][gol]=kyo;
}

for(int p=0;p<v-1;p++){
	int z[1000];
	for(int y=0;y<v;y++){
		z[y]=100000;
	}
	for(int k=0;k<v;k++){
		if(che[k]==1){
			for(int w=0;w<v;w++){
				if(rin[k][w]>0){
					z[w]=min(z[w],tyo[k]+rin[k][w]);
				}
			}
		}
	}
	int maxk=100000+1,ky=-1;
	for(int k=0;k<v;k++){
		if(maxk>z[k]&&che[k]==0){
			maxk=z[k];
			ky=k;
		}
	}
	
	che[ky]=1;
	tyo[ky]=z[ky];
	
}

for(int k=0;k<v;k++){
	if(tyo[k]!=100000){
	cout<<tyo[k]<<endl;
	}
	else{
		cout<<"INF"<<endl;
	}
	}


	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope
    4 | cin>>v>>e>>r;
      | ^~~
a.cc:34:46: error: 'min' was not declared in this scope; did you mean 'rin'?
   34 |                                         z[w]=min(z[w],tyo[k]+rin[k][w]);
      |                                              ^~~
      |                                              rin
a.cc:54:9: error: 'cout' was not declared in this scope
   54 |         cout<<tyo[k]<<endl;
      |         ^~~~
a.cc:54:23: error: 'endl' was not declared in this scope
   54 |         cout<<tyo[k]<<endl;
      |                       ^~~~
a.cc:57:17: error: 'cout' was not declared in this scope
   57 |                 cout<<"INF"<<endl;
      |                 ^~~~
a.cc:57:30: error: 'endl' was not declared in this scope
   57 |                 cout<<"INF"<<endl;
      |                              ^~~~
Language: C++

#include<iostream>

using namespace std;

#define MAX 100000
#define INF 10000000000

int V,E,R;
long long cost[MAX][MAX];
long long dist[MAX];
bool used[MAX];

int main(){
  int s,t,d;

  cin>>V>>E>>R;

  fill(dist,dist+V,INF);
  fill(used,used+V,false);
  for(int i=0;i<V;i++){
    fill(cost[i],cost[i]+V,INF);
  }

  dist[R] = 0;
  
  for(int i=0;i<E;i++){
    cin>>s>>t>>d;
    cost[s][t]=d;
  }
  
  while(true){
    int v = -1;
    for(int u=0;u<V;u++){
      if(!used[u] && (v==-1 || dist[u]<dist[v]))
	v=u;
    }

    if(v==-1){
      break;
    }

    used[v] = true;

    for(int u=0;u<V;u++){
      dist[u]=min(dist[u],dist[v]+cost[v][u]);
    }
  }

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

Compiler output:
/tmp/ccMKTZSD.o: in function `main':
a.cc:(.text+0x6c): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x81): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x9c): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0xb1): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x142): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x1e6): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x20b): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x223): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x257): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x27b): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccMKTZSD.o
a.cc:(.text+0x2c2): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>

using namespace std;

#define MAX 100000
#define INF 2000000000

int cost[MAX][MAX];
long long dist[MAX];
char used[MAX];

int main(){
  int s,t,d;
  int V,E,R;
  
  cin>>V>>E>>R;
    
  fill(dist,dist+V,INF);
  fill(used,used+V,0);
  for(int i=0;i<V;i++){
    fill(cost[i],cost[i]+V,INF);
  }

  dist[R] = 0;
  
  for(int i=0;i<E;i++){
    cin>>s>>t>>d;
    cost[s][t]=d;
  }
  
  while(true){
    int v = -1;
    for(int u=0;u<V;u++){
      if(used[u]==0 && (v==-1 || dist[u]<dist[v]))
	v=u;
    }

    if(v==-1){
      break;
    }

    used[v] = 1;

    for(int u=0;u<V;u++){
      dist[u]=min(dist[u],dist[v]+cost[v][u]);
    }
  }

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

Compiler output:
/tmp/ccfU4YEn.o: in function `main':
a.cc:(.text+0x59): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x6e): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x89): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x9e): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x11f): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x1bd): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x1df): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x1f7): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x228): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x24c): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccfU4YEn.o
a.cc:(.text+0x294): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status