Language: C++

#include <iostream>  

using namespace std;  
  
#define MAX 500000
  
#define LEN 100000  
  
int map[LEN][LEN]; 
  
int dist[LEN];            
  
int mark[LEN];  
  

  
void init(){  
  
       int i,j;  
  
       for(i=0;i<LEN;i++){  
  
              for(j=0;j<LEN;j++){  
  
                     map[i][j]=MAX;  
  
              }  
  
       }  
  
         
  
}  
  

  
void myDijstra(int n,int start){  
  
       int i,j,min,k;  
  
       for(i=0;i<n;i++){  
  
              mark[i]=0;
  
              dist[i]=map[start][i]; 
  
                
  
       }  
  
       mark[start]=1; 
  
       dist[start]=0;  
  
       for(i=0;i<n;i++){  
  
              min=MAX;  
  
              for(j=0;j<n;j++){  
  
                     if(!mark[j] && dist[j]<min){    
  
                            min=dist[j];  
  
                            k=j;
  
                     }  
  
              }  
  
              if(min==MAX)  
  
                     break;  
  
              mark[k]=1;
  
  
              for(j=0;j<n;j++){  
  
                     if(!mark[j] && dist[j]>dist[k]+map[k][j]){  
  
                            dist[j]=dist[k]+map[k][j];  
  
                     }  
  
              }  
  
       }  
  
}  
  
   
  
int main(){  
  
       int i,j,n,line,source;  
  
       int a,b,d;  
  
       cin>>n>>line>>source;   
  
       init();  
  
       for(i=0;i<line;i++){  
  
              cin>>a>>b>>d; 
  
              if(map[a][b]>d){  
  
                     map[a][b]=d;  
  
              }  
  
       }  
  
       myDijstra(n,source);
  
  
       for (i=0;i<n;i++) {
		if(dist[i] == MAX){
			cout<<"INF"<<endl;
		}else{
			cout<<dist[i]<<endl;
		}
	
} 
  
       return 0;  
  
}  

Compiler output:
/tmp/ccH0jSrM.o: in function `myDijstra(int, int)':
a.cc:(.text+0x82): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0xc5): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0xe8): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0x103): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0x13a): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0x155): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0x171): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0x1aa): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0x1d1): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0x1f0): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccH0jSrM.o
a.cc:(.text+0x207): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status