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

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

using namespace std;

const int Inf = 10000 * 100000 + 100;

int main(){
  int V,E,R;
  cin >> V >> E >> R;
  vector<int> s(E),t(E),d(E);
  vector<vector<int> > edge(V, {});
  for(int i = 0; i < E; i++){
    cin >> s[i] >> t[i] >> d[i];
    edge[s[i]].push_back(i);
  }
  vector<int> cost(V, Inf);
  cost[R] = 0;

  // < ?§??????????????????¢, ?????????id >
  priority_queue<pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > q;
  q.push({0, R});

  // ????????????????????????
  vector<bool> fin(V, false);

  // vector<vector<int> > edge(V);
  // for(int i = 0; i < V; i++){
  //   edge[i] = {};
  //   // ?????? i ?????????????????????????????????
  //   for(int j = 0; j < E; j++){
  //     if(s[j] == i) edge[i].push_back(j);
  //   }
  // }


  while(!q.empty()){
    // ?¢?????????????????????? u ??¨??????
    auto npair = q.top();
    int nd = npair.first, nu = npair.second;
    // cout << nd << " : " << nu << endl;

    q.pop();
    if(fin[nu]) continue; // ?¢??????????????????????
    fin[nu] = true;
    cost[nu] = nd;
    for(auto i : edge[nu]){
      // u ????§??????§?¢????????????§???????????????????????????????????????
      if(!fin[t[i]]){
        // ????????? v ??¨??????.
        int nv = t[i];
        // ????????§?????????????????????
        if(cost[nu] + d[i] < cost[nv]){
          cost[nv] = cost[nu] + d[i];
          q.push({cost[nv], nv});
        }
      }
    }
  }

  for(int i = 0; i < V; i++){
    if(cost[i] == Inf)
      cout << "INF";
    else
      cout << cost[i];

    cout << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:34: error: call of overloaded 'vector(int&, <brace-enclosed initializer list>)' is ambiguous
   15 |   vector<vector<int> > edge(V, {});
      |                                  ^
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:569:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const value_type&, const allocator_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; size_type = long unsigned int; value_type = std::vector<int>; allocator_type = std::allocator<std::vector<int> >]'
  569 |       vector(size_type __n, const value_type& __value,
      |       ^~~~~~
/usr/include/c++/14/bits/stl_vector.h:556:7: note: candidate: 'std::vector<_Tp, _Alloc>::vector(size_type, const allocator_type&) [with _Tp = std::vector<int>; _Alloc = std::allocator<std::vector<int> >; size_type = long unsigned int; allocator_type = std::allocator<std::vector<int> >]'
  556 |       vector(size_type __n, const allocator_type& __a = allocator_type())
      |       ^~~~~~
Language: C++

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

#define MAX_VERTEX 100000
#define INF 1000000

int vertex_num, edge_num, r;
int cost[MAX_VERTEX][MAX_VERTEX];
int d[MAX_VERTEX];
bool used[MAX_VERTEX];

void Dijkstra() {
  d[r] = 0;

  while(true) {
    int vertex = -1;
    for(int u = 0; u < vertex_num; u++) {
      if(!used[u] && (vertex == -1 || d[u] < d[vertex])) {
        vertex = u;
      }
    }

    if (vertex == -1) break;

    used[vertex] = true;

    for(int u = 0; u < vertex_num; u++) {
      d[u] = min(d[u], d[vertex] + cost[vertex][u]);
    }
  }
}

int main() {
  cin >> vertex_num >> edge_num >> r;

  for(int i = 0; i < vertex_num; i++) {
    d[i] = INF;
    used[i] = false;

    for(int j = 0; j < vertex_num; j++) {
      cost[i][j] = INF;
    }
  }

  for (int i = 0; i < edge_num; i++) {
    int start, terminus, c;
    cin >> start >> terminus >> c;
    cost[start][terminus] = c;
  }

  Dijkstra();

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

  return 0;
}

Compiler output:
/tmp/cczHp7ei.o: in function `Dijkstra()':
a.cc:(.text+0x1b): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0x3e): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0x63): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0x7a): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0xac): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0xd0): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0x113): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0x13c): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cczHp7ei.o
/tmp/cczHp7ei.o: in function `main':
a.cc:(.text+0x1c3): relocation truncated to fit: R_X86_64_PC32 against symbol `d' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0x1d6): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/cczHp7ei.o
a.cc:(.text+0x2ce): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<utility>
using namespace std;
const int inf=10000*100000+10;
int s[500000+10];
int t[500000+10];
int d[500000+10];
long int dis[100000+10];
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > pq;
vector<int> q;
vector<pair<int,int> > al[100000+10];
int main()
{
    int v,e,r;
    cin>>v>>e>>r;
    for(int i=0;i<e;i++)
    {
        cin>>s[i]>>t[i]>>d[i];
        al[s[i]].push_back(make_pair(t[i],d[i]));
    }
    
    for(int i=0;i<v;i++)
    {
        dis[i]=inf;
        q.push_back(i);
    }
    dis[r]=0;
    
    while(!q.empty())
    {
        
        int tempv=0,tempd=inf,tempi=0;
        for(int i=0;i<q.size();i++)
        {
            if(dis[q[i]]<tempd||dis[q[i]]==0)
            {
                tempd=dis[q[i]];
                tempv=q[i];
                tempi=i;
            }
        }
        
        q.erase(q.begin()+tempi);
        
        /*for(int i=0;i<e;i++)
        {
            if(s[i]==tempv)
                pq.push(make_pair(d[i],t[i]));
        }*/
        
        for(int i=0;i<al[tempv].size();i++)
        {
            pq.push(make_pair(al[tempv].second,al[tempv].first));
        }
        
        while(!pq.empty())
        {
            pair<int,int> temp=pq.top();
            pq.pop();
            dis[temp.second]=min(dis[temp.second],dis[tempv]+temp.first);
        }
    }
    
    for(int i=0;i<v;i++)
    {
        if(dis[i]==inf)
            cout<<"INF"<<endl;
        else
            cout<<dis[i]<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:55:41: error: 'class std::vector<std::pair<int, int> >' has no member named 'second'
   55 |             pq.push(make_pair(al[tempv].second,al[tempv].first));
      |                                         ^~~~~~
a.cc:55:58: error: 'class std::vector<std::pair<int, int> >' has no member named 'first'
   55 |             pq.push(make_pair(al[tempv].second,al[tempv].first));
      |                                                          ^~~~~
a.cc:72:6: error: expected '}' at end of input
   72 |     }
      |      ^
a.cc:15:1: note: to match this '{'
   15 | {
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<utility>
using namespace std;
const int inf=10000*100000+10;
int s[500000+10];
int t[500000+10];
int d[500000+10];
long int dis[100000+10];
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > pq;
priority_queue<int> q;
vector<pair<int,int> > al[100000+10];
int main()
{
    int v,e,r;
    cin>>v>>e>>r;
    for(int i=0;i<e;i++)
    {
        cin>>s[i]>>t[i]>>d[i];
        al[s[i]].push_back(make_pair(t[i],d[i]));
    }
    
    for(int i=0;i<v;i++)
    {
        dis[i]=inf;
        q.push_back(i);
    }
    dis[r]=0;
    
    while(!q.empty())
    {
        
        int tempv=0,tempd=inf,tempi=0;
        /*for(int i=0;i<q.size();i++)
        {
            if(dis[q[i]]<tempd||dis[q[i]]==0)
            {
                tempd=dis[q[i]];
                tempv=q[i];
                tempi=i;
            }
        }*/
        //q.erase(q.begin()+tempi);
        
        tempv=q.top();
        q.pop();
        
        /*for(int i=0;i<e;i++)
        {
            if(s[i]==tempv)
                pq.push(make_pair(d[i],t[i]));
        }*/
        
        for(int i=0;i<al[tempv].size();i++)
        {
            pq.push(make_pair(al[tempv][i].second,al[tempv][i].first));
        }
        
        while(!pq.empty())
        {
            pair<int,int> temp=pq.top();
            pq.pop();
            dis[temp.second]=min(dis[temp.second],dis[tempv]+temp.first);
        }
    }
    
    for(int i=0;i<v;i++)
    {
        if(dis[i]==inf)
            cout<<"INF"<<endl;
        else
            cout<<dis[i]<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:11: error: 'class std::priority_queue<int>' has no member named 'push_back'
   27 |         q.push_back(i);
      |           ^~~~~~~~~
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<utility>
#include<set>
using namespace std;
const int inf=10000*100000+10;
int s[500000+10];
int t[500000+10];
int d[500000+10];
long int dis[100000+10];
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > pq;
vector<int> q;
vector<pair<int,int> > al[100000+10];
bool have(vector<int> v, int i)
{
    for(int i=0;i<v.size();i++)
    {
        if(v[i]==i)
            return true;
    }
    reture false;
}
int main()
{
    int v,e,r;
    cin>>v>>e>>r;
    for(int i=0;i<e;i++)
    {
        cin>>s[i]>>t[i]>>d[i];
        al[s[i]].push_back(make_pair(t[i],d[i]));
    }
    
    /*for(int i=0;i<v;i++)
    {
        dis[i]=inf;
        q.push(i);
    }*/
    dis[r]=0;
    q.push(r);
    
    while(!q.empty())
    {
        
        int tempv=0,tempd=inf,tempi=0;
        for(int i=0;i<q.size();i++)
        {
            if(dis[q[i]]<tempd||dis[q[i]]==0)
            {
                tempd=dis[q[i]];
                tempv=q[i];
                tempi=i;
            }
        }
        q.erase(q.begin()+tempi);

        
        /*for(int i=0;i<e;i++)
        {
            if(s[i]==tempv)
                pq.push(make_pair(d[i],t[i]));
        }*/
        
        for(int i=0;i<al[tempv].size();i++)
        {
            pq.push(make_pair(al[tempv][i].second,al[tempv][i].first));
        }
        
        while(!pq.empty())
        {
            pair<int,int> temp=pq.top();
            pq.pop();
            //dis[temp.second]=min(dis[temp.second],dis[tempv]+temp.first);
            if(dis[temp.second]>dis[tempv]+temp.first)
            {
                dis[temp.second]=dis[tempv]+temp.first;
                if(!have(q,temp.second))
                    q.push(temp.second);
            }
        }
    }
    
    for(int i=0;i<v;i++)
    {
        if(dis[i]==inf)
            cout<<"INF"<<endl;
        else
            cout<<dis[i]<<endl;
    }
}

Compiler output:
a.cc: In function 'bool have(std::vector<int>, int)':
a.cc:22:5: error: 'reture' was not declared in this scope
   22 |     reture false;
      |     ^~~~~~
a.cc: In function 'int main()':
a.cc:40:7: error: 'class std::vector<int>' has no member named 'push'
   40 |     q.push(r);
      |       ^~~~
a.cc:78:23: error: 'class std::vector<int>' has no member named 'push'
   78 |                     q.push(temp.second);
      |                       ^~~~
a.cc: In function 'bool have(std::vector<int>, int)':
a.cc:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<utility>
#include<set>
using namespace std;
const int inf=10000*100000+10;
int s[500000+10];
int t[500000+10];
int d[500000+10];
long int dis[100000+10];
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > pq;
vector<int> q;
vector<pair<int,int> > al[100000+10];
bool have(vector<int> v, int i)
{
    for(int i=0;i<v.size();i++)
    {
        if(v[i]==i)
            return true;
    }
    return false;
}
int main()
{
    int v,e,r;
    cin>>v>>e>>r;
    for(int i=0;i<e;i++)
    {
        cin>>s[i]>>t[i]>>d[i];
        al[s[i]].push_back(make_pair(t[i],d[i]));
    }
    
    /*for(int i=0;i<v;i++)
    {
        dis[i]=inf;
        q.push(i);
    }*/
    dis[r]=0;
    q.push(r);
    
    while(!q.empty())
    {
        
        int tempv=0,tempd=inf,tempi=0;
        for(int i=0;i<q.size();i++)
        {
            if(dis[q[i]]<tempd||dis[q[i]]==0)
            {
                tempd=dis[q[i]];
                tempv=q[i];
                tempi=i;
            }
        }
        q.erase(q.begin()+tempi);

        
        /*for(int i=0;i<e;i++)
        {
            if(s[i]==tempv)
                pq.push(make_pair(d[i],t[i]));
        }*/
        
        for(int i=0;i<al[tempv].size();i++)
        {
            pq.push(make_pair(al[tempv][i].second,al[tempv][i].first));
        }
        
        while(!pq.empty())
        {
            pair<int,int> temp=pq.top();
            pq.pop();
            //dis[temp.second]=min(dis[temp.second],dis[tempv]+temp.first);
            if(dis[temp.second]>dis[tempv]+temp.first)
            {
                dis[temp.second]=dis[tempv]+temp.first;
                if(!have(q,temp.second))
                    q.push(temp.second);
            }
        }
    }
    
    for(int i=0;i<v;i++)
    {
        if(dis[i]==inf)
            cout<<"INF"<<endl;
        else
            cout<<dis[i]<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:7: error: 'class std::vector<int>' has no member named 'push'
   40 |     q.push(r);
      |       ^~~~
a.cc:78:23: error: 'class std::vector<int>' has no member named 'push'
   78 |                     q.push(temp.second);
      |                       ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<utility>
using namespace std;
const int inf=10000*100000+10;
int s[500000+10];
int t[500000+10];
int d[500000+10];
long int dis[100000+10];
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > pq;
//vector<int> q;
vector<pair<int,int> > al[100000+10];
bool com(int a,int b)
{
    return dis[a]<dis[b];
};
priority_queue<int,vector<int>,com> q;
int main()
{
    int v,e,r;
    cin>>v>>e>>r;
    for(int i=0;i<e;i++)
    {
        cin>>s[i]>>t[i]>>d[i];
        al[s[i]].push_back(make_pair(t[i],d[i]));
    }
    
    for(int i=0;i<v;i++)
    {
        dis[i]=inf;
        //q.push(i);
    }
    dis[r]=0;
    q.push_back(r);
    
    while(!q.empty())
    {
        
        int tempv=0,tempd=inf,tempi=0;
        /*for(int i=0;i<q.size();i++)
        {
            if(dis[q[i]]<tempd||dis[q[i]]==0)
            {
                tempd=dis[q[i]];
                tempv=q[i];
                tempi=i;
            }
        }
        q.erase(q.begin()+tempi);*/
        tempv=q.top();
        q.pop();
        
        
        /*for(int i=0;i<e;i++)
         {
         if(s[i]==tempv)
         pq.push(make_pair(d[i],t[i]));
         }*/
        
        for(int i=0;i<al[tempv].size();i++)
        {
            pq.push(make_pair(al[tempv][i].second,al[tempv][i].first));
        }
        
        while(!pq.empty())
        {
            pair<int,int> temp=pq.top();
            pq.pop();
            if(dis[temp.second]>dis[tempv]+temp.first)
            {
                dis[temp.second]=dis[tempv]+temp.first;
                q.push(temp.second);
            }
        }
    }
    
    for(int i=0;i<v;i++)
    {
        if(dis[i]==inf)
            cout<<"INF"<<endl;
        else
            cout<<dis[i]<<endl;
    }
}

Compiler output:
a.cc:18:35: error: type/value mismatch at argument 3 in template parameter list for 'template<class _Tp, class _Sequence, class _Compare> class std::priority_queue'
   18 | priority_queue<int,vector<int>,com> q;
      |                                   ^
a.cc:18:35: note:   expected a type, got 'com'
a.cc: In function 'int main()':
a.cc:35:7: error: request for member 'push_back' in 'q', which is of non-class type 'int'
   35 |     q.push_back(r);
      |       ^~~~~~~~~
a.cc:37:14: error: request for member 'empty' in 'q', which is of non-class type 'int'
   37 |     while(!q.empty())
      |              ^~~~~
a.cc:51:17: error: request for member 'top' in 'q', which is of non-class type 'int'
   51 |         tempv=q.top();
      |                 ^~~
a.cc:52:11: error: request for member 'pop' in 'q', which is of non-class type 'int'
   52 |         q.pop();
      |           ^~~
a.cc:73:19: error: request for member 'push' in 'q', which is of non-class type 'int'
   73 |                 q.push(temp.second);
      |                   ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<utility>
using namespace std;
const int inf=10000*100000+10;
int s[500000+10];
int t[500000+10];
int d[500000+10];
long int dis[100000+10];
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > pq;
//vector<int> q;
vector<pair<int,int> > al[100000+10];
bool comp(int a,int b)
{
    return dis[a]<dis[b];
};
priority_queue<int,vector<int>,comp> q;
int main()
{
    int v,e,r;
    cin>>v>>e>>r;
    for(int i=0;i<e;i++)
    {
        cin>>s[i]>>t[i]>>d[i];
        al[s[i]].push_back(make_pair(t[i],d[i]));
    }
    
    for(int i=0;i<v;i++)
    {
        dis[i]=inf;
        //q.push(i);
    }
    dis[r]=0;
    q.push_back(r);
    
    while(!q.empty())
    {
        
        int tempv=0,tempd=inf,tempi=0;
        /*for(int i=0;i<q.size();i++)
        {
            if(dis[q[i]]<tempd||dis[q[i]]==0)
            {
                tempd=dis[q[i]];
                tempv=q[i];
                tempi=i;
            }
        }
        q.erase(q.begin()+tempi);*/
        tempv=q.top();
        q.pop();
        
        
        /*for(int i=0;i<e;i++)
         {
         if(s[i]==tempv)
         pq.push(make_pair(d[i],t[i]));
         }*/
        
        for(int i=0;i<al[tempv].size();i++)
        {
            pq.push(make_pair(al[tempv][i].second,al[tempv][i].first));
        }
        
        while(!pq.empty())
        {
            pair<int,int> temp=pq.top();
            pq.pop();
            if(dis[temp.second]>dis[tempv]+temp.first)
            {
                dis[temp.second]=dis[tempv]+temp.first;
                q.push(temp.second);
            }
        }
    }
    
    for(int i=0;i<v;i++)
    {
        if(dis[i]==inf)
            cout<<"INF"<<endl;
        else
            cout<<dis[i]<<endl;
    }
}

Compiler output:
a.cc:18:36: error: type/value mismatch at argument 3 in template parameter list for 'template<class _Tp, class _Sequence, class _Compare> class std::priority_queue'
   18 | priority_queue<int,vector<int>,comp> q;
      |                                    ^
a.cc:18:36: note:   expected a type, got 'comp'
a.cc: In function 'int main()':
a.cc:35:7: error: request for member 'push_back' in 'q', which is of non-class type 'int'
   35 |     q.push_back(r);
      |       ^~~~~~~~~
a.cc:37:14: error: request for member 'empty' in 'q', which is of non-class type 'int'
   37 |     while(!q.empty())
      |              ^~~~~
a.cc:51:17: error: request for member 'top' in 'q', which is of non-class type 'int'
   51 |         tempv=q.top();
      |                 ^~~
a.cc:52:11: error: request for member 'pop' in 'q', which is of non-class type 'int'
   52 |         q.pop();
      |           ^~~
a.cc:73:19: error: request for member 'push' in 'q', which is of non-class type 'int'
   73 |                 q.push(temp.second);
      |                   ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<utility>
using namespace std;
const int inf=10000*100000+10;
int s[500000+10];
int t[500000+10];
int d[500000+10];
long int dis[100000+10];
priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > pq;
//vector<int> q;
vector<pair<int,int> > al[100000+10];
struct comp
{
    bool operator ()(int a,int b)
    {
        return dis[a]<dis[b];
    }    
};

priority_queue<int,vector<int>,comp> q;
int main()
{
    int v,e,r;
    cin>>v>>e>>r;
    for(int i=0;i<e;i++)
    {
        cin>>s[i]>>t[i]>>d[i];
        al[s[i]].push_back(make_pair(t[i],d[i]));
    }
    
    for(int i=0;i<v;i++)
    {
        dis[i]=inf;
        //q.push(i);
    }
    dis[r]=0;
    q.push_back(r);
    
    while(!q.empty())
    {
        
        int tempv=0,tempd=inf,tempi=0;
        /*for(int i=0;i<q.size();i++)
        {
            if(dis[q[i]]<tempd||dis[q[i]]==0)
            {
                tempd=dis[q[i]];
                tempv=q[i];
                tempi=i;
            }
        }
        q.erase(q.begin()+tempi);*/
        tempv=q.top();
        q.pop();
        
        
        /*for(int i=0;i<e;i++)
         {
         if(s[i]==tempv)
         pq.push(make_pair(d[i],t[i]));
         }*/
        
        for(int i=0;i<al[tempv].size();i++)
        {
            pq.push(make_pair(al[tempv][i].second,al[tempv][i].first));
        }
        
        while(!pq.empty())
        {
            pair<int,int> temp=pq.top();
            pq.pop();
            if(dis[temp.second]>dis[tempv]+temp.first)
            {
                dis[temp.second]=dis[tempv]+temp.first;
                q.push(temp.second);
            }
        }
    }
    
    for(int i=0;i<v;i++)
    {
        if(dis[i]==inf)
            cout<<"INF"<<endl;
        else
            cout<<dis[i]<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:7: error: 'class std::priority_queue<int, std::vector<int>, comp>' has no member named 'push_back'
   39 |     q.push_back(r);
      |       ^~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define INF 10000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define all(n) n.begin(),n.end()

using namespace std;

using ll = long long;
using PII = pair<int, int>;

int main(void){
	int V, E, r
	vector<PII> g[100000];
	ll d[100000];
	fill(d, d+100000, INF);
	cin >> V >> E >> r;
	REP(i, V){
		int s, t, d;
		cin >> s >> t >> d;
		g[s].push_back(PII(d, t));
	}

	d[r] = 0;
	priority_queue<PII, vector<PII>, greater<PII> > que;
	que.push(PII(0, r));
	while(que.size()){
		PII p = que.top(); que.pop();
		int v = p.second;
		if(d[v] < p.first) continue;
		REP(i, G[v].size()){
			PII e = G[v][i];
			if(d[e.second] > d[v] + e.first){
				d[e.second] = d[v] + e.first;
				que.push(PII(d[e.second], e.second));
			}
		}
	}
	REP(i, V){
		if(d[i] == INF){
			cout << "INF" << endl;
		}else{
			cout << d[i] << endl;
		}			
	}
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:22:9: error: expected initializer before 'vector'
   22 |         vector<PII> g[100000];
      |         ^~~~~~
a.cc:25:26: error: 'r' was not declared in this scope
   25 |         cin >> V >> E >> r;
      |                          ^
a.cc:29:17: error: 'g' was not declared in this scope
   29 |                 g[s].push_back(PII(d, t));
      |                 ^
a.cc:39:24: error: 'G' was not declared in this scope
   39 |                 REP(i, G[v].size()){
      |                        ^
a.cc:12:38: note: in definition of macro 'REP'
   12 | #define REP(i, n) for(int i = 0;i < (n);i++)
      |                                      ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define INF 10000000
#define REP(i, n) for(int i = 0;i < (n);i++)
#define all(n) n.begin(),n.end()

using namespace std;

using ll = long long;
using PII = pair<int, int>;

int main(void){
	int V, E, r;
	cin >> V >> E >> r;
	vector<PII> G[100000];
	int d[100000];
	fill(d, d+100000, INF);
	REP(i, E){
		int a, b, c;
		cin >> a >> b >> c;
		G[a-1].push_back(PII(c, b-1));
	}
	d[r-1] = 0;
	priority_queue<PII, vector<PII>, greater<PII > que;
	que.push(PII(0, r-1));
	while(que.size()){
		PII p = que.top();que.pop();
		int v = p.second;
		if(p.first > d[v]) continue;
		REP(i, G[v].size()){
			if(G[v][i].first + d[v] < d[G[v][i]].second){
				d[G[v][i].second] = G[v][i].first + d[v];
				que.push(PII(d[G[v][i].second], G[v][i].second));
			}
		}
	}
	REP(i, V){
		cout << d[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:56: error: template argument 3 is invalid
   32 |         priority_queue<PII, vector<PII>, greater<PII > que;
      |                                                        ^~~
a.cc:33:9: error: 'que' was not declared in this scope
   33 |         que.push(PII(0, r-1));
      |         ^~~
a.cc:39:52: error: no match for 'operator[]' (operand types are 'int [100000]' and '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'std::pair<int, int>'})
   39 |                         if(G[v][i].first + d[v] < d[G[v][i]].second){
      |                                                    ^
Language: C++

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

class Node{
public:
	vector<int> to;
	vector<int> ecost;
	int cost;
	bool done;
};

void find(Node *node, int nodes, int start);

int main(){
	int v, e, r;
	cin >> v >> e >> r;

	int s[e], t[e], d[e];
	int i;
	for(i=0 ; i<e; i++){
		cin >> s[i] >> t[i] >> d[i];
	}
	
	Node node[v];
	for(i=0; i<e; i++){
		node[s[i]].to.push_back(t[i]);
		node[s[i]].ecost.push_back(d[i]);
	}

	find(node, v, r);
	for(i=0; i<v; i++){
		if(node[i].cost==-1){ cout << "INF" << endl;}
		else{ cout << node[i].cost << endl; }
	}

	return 0;
}

void find(Node *node, int nodes, int start){
	int i, j;
	for(i=0; i<nodes; i++){
		node[i].done=0;
		node[i].cost=-1;
	}
	node[start].cost=0;
	node[start].done=1;

	for(i=0; i<node[start].to.size(); i++){
		node[node[start].to[i]].cost = node[start].ecost[i];
	}

	bool dflag;
	while(1) {
		j=1;
	    for(i=0; i<nodes; i++){ j *= node[i].done; }
	    if(j) break;

		for(i=0; i<nodes; i++){
			dflag=1;
			if(node[i].done) continue;
			if(node[i].cost==-1) continue;

			for(j=0; j<node[i].to.size(); i++){
				if(node[j].cost == -1){
					node[node[i]].to[j]].cost = node[i].cost+node[i].ecost[j];
					dflag=0;
					continue;
				}
				if(node[i].cost+node[i].ecost[j] < node[node[i].to[j]].cost){
					node[node[i]].to[j]].cost = node[i].cost+node[i].ecost[j];
					dflag=0;
					continue;
				}
			}
			if(dflag) node[i].done=1;
		}
	}
}

Compiler output:
a.cc: In function 'void find(Node*, int, int)':
a.cc:66:45: error: no match for 'operator[]' (operand types are 'Node*' and 'Node')
   66 |                                         node[node[i]].to[j]].cost = node[i].cost+node[i].ecost[j];
      |                                             ^
a.cc:71:45: error: no match for 'operator[]' (operand types are 'Node*' and 'Node')
   71 |                                         node[node[i]].to[j]].cost = node[i].cost+node[i].ecost[j];
      |                                             ^
Language: C++

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

class Node{
public:
	vector<int> to;
	vector<int> from;
	vector<int> ecost;
	int cost;
	bool done;
};

void find(Node *node, int nodes, int start);

int main(){
	int v, e, r;
	cin >> v >> e >> r;

	int s[e], t[e], d[e];
	int i;
	for(i=0 ; i<e; i++){
		cin >> s[i] >> t[i] >> d[i];
	}
	
	Node node[v];
	for(i=0; i<e; i++){
		node[s[i]].to.push_back(t[i]);
		node[s[i]].ecost.push_back(d[i]);
		node[t[i]].from.push_back(s[i]);
	}

	find(node, v, r);
	for(i=0; i<v; i++){
		if(node[i].cost==-1){ cout << "INF" << endl;}
		else{ cout << node[i].cost << endl; }
	}

	return 0;
}

void find(Node *node, int nodes, int start){
	int i, j;
	for(i=0; i<nodes; i++){
		node[i].done=0;
		node[i].cost=-1;
	}
	node[start].cost=0;
	node[start].done=1;

	for(i=0; i<node[start].to.size(); i++){
		node[node[start].to[i]].cost = node[start].ecost[i];
	}

	bool dflag;
	while(1) {
		j=1;
	    for(i=0; i<nodes; i++){ j *= node[i].done; }
	    if(j) break;

		for(i=0; i<nodes; i++){
			dflag=1;
			if(node[i].to.from()==0) node[i].done=1;
			if(node[i].done) continue;
			if(node[i].cost==-1) continue;

			for(j=0; j<node[i].to.size(); j++){
				if(node[node[i].to[j]].cost == -1){
					node[node[i].to[j]].cost = node[i].cost + node[i].ecost[j];
					dflag=0;
					continue;
				}
				if(node[node[i].to[j]].cost > node[i].cost + node[i].ecost[j]){
					node[node[i].to[j]].cost = node[i].cost + node[i].ecost[j];
					dflag=0;
					continue;
				}
			}
			if(dflag) node[i].done=1;
		}
	}
}

Compiler output:
a.cc: In function 'void find(Node*, int, int)':
a.cc:63:39: error: 'class std::vector<int>' has no member named 'from'
   63 |                         if(node[i].to.from()==0) node[i].done=1;
      |                                       ^~~~
Language: C++

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

class Node{
public:
	vector<int> to;
	vector<int> from;
	vector<int> ecost;
	int cost;
	bool done;
};

void find(Node *node, int nodes, int start);

int main(){
	int v, e, r;
	cin >> v >> e >> r;

	int s[e], t[e], d[e];
	int i;
	for(i=0 ; i<e; i++){
		cin >> s[i] >> t[i] >> d[i];
	}
	
	Node node[v];
	for(i=0; i<e; i++){
		node[s[i]].to.push_back(t[i]);
		node[s[i]].ecost.push_back(d[i]);
		node[t[i]].from.push_back(s[i]);
	}

	find(node, v, r);
	for(i=0; i<v; i++){
		if(node[i].cost==-1){ cout << "INF" << endl;}
		else{ cout << node[i].cost << endl; }
	}

	return 0;
}

void find(Node *node, int nodes, int start){
	int i, j;
	for(i=0; i<nodes; i++){
		node[i].done=0;
		node[i].cost=-1;
	}
	node[start].cost=0;
	node[start].done=1;

	for(i=0; i<node[start].to.size(); i++){
		node[node[start].to[i]].cost = node[start].ecost[i];
	}

	bool dflag;
	while(1) {
		j=1;
	    for(i=0; i<nodes; i++){ j *= node[i].done; }
	    if(j) break;

		for(i=0; i<nodes; i++){
			dflag=1;
			if(node[i].to.from.size()==0) node[i].done=1;
			if(node[i].done) continue;
			if(node[i].cost==-1) continue;

			for(j=0; j<node[i].to.size(); j++){
				if(node[node[i].to[j]].cost == -1){
					node[node[i].to[j]].cost = node[i].cost + node[i].ecost[j];
					dflag=0;
					continue;
				}
				if(node[node[i].to[j]].cost > node[i].cost + node[i].ecost[j]){
					node[node[i].to[j]].cost = node[i].cost + node[i].ecost[j];
					dflag=0;
					continue;
				}
			}
			if(dflag) node[i].done=1;
		}
	}
}

Compiler output:
a.cc: In function 'void find(Node*, int, int)':
a.cc:63:39: error: 'class std::vector<int>' has no member named 'from'
   63 |                         if(node[i].to.from.size()==0) node[i].done=1;
      |                                       ^~~~
Language: C++

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

class Node{
public:
	vector<int> to;
	vector<int> from;
	vector<int> ecost;
	int cost;
	bool done;
	bool avail;
	Node(){ done=0; cost=-1; avail=0; }
};

void check(Node *node, int nodes, int start);
void find(Node *node, int nodes, int start);

int main(){
	int v, e, r;
	cin >> v >> e >> r;

	int s[e], t[e], d[e];
	int i;
	for(i=0 ; i<e; i++){
		cin >> s[i] >> t[i] >> d[i];
	}
	
	Node node[v];
	for(i=0; i<e; i++){
		node[s[i]].to.push_back(t[i]);
		node[s[i]].ecost.push_back(d[i]);
		node[t[i]].from.push_back(s[i]);
	}

	check(node, v, r);
	find(node, v, r);
	for(i=0; i<v; i++){
		if(node[i].cost==-1){ cout << "INF" << endl;}
		else{ cout << node[i].cost << endl; }
	}

	//cin >> i;
	return 0;
}

void check(Node *node, int nodes, int start){
	int i ,j;
	int loop=0;

	node[start].avail=1;
	for(i=0; i<node[start].to.size(); i++){
		node[node[start].to[i]].avail=1;
		loop=1;
	}
	
	while(loop){
		loop=0;
		for(i=0; i<nodes; i++){
			for(j=0; j<node[i].to.size(); j++){
				if(node[node[i].to[j]].avail==0){
					node[node[i].to[j]].avail=1;
					loop=1;
				}
			}
		}
	}
	for(i=0; i<nodes; i++){
		if(node[i].avail==0){
			node[i].done=1;
		}
	}
}

void find(Node *node, int nodes, int start){
	int i, j;
	if(node[start].done) return;
	queue<int> to;
	node[start].cost=0;
	node[start].done=1;

	for(i=0; i<node[start].to.size(); i++){
		node[node[start].to[i]].cost = node[start].ecost[i];
		to.push(node[start].to[i])
	}
	

	 
	while(1) {
		j=1;
	    for(i=0; i<nodes; i++){ j *= node[i].done; }
	    if(j) break;

		while(!to.empty()){
			if(node[to.front()].to.size()==0) node[to.front()].done=1;
			if(node[to.front()].done) continue;
			if(node[to.front()].cost==-1) continue;

			for(j=0; j<node[to.front()].to.size(); j++){
				if(node[node[to.front()].to[j]].cost == -1){
					node[node[to.front()].to[j]].cost = node[to.front()].cost + node[to.front()].ecost[j];
					to.push(node[to.front()].to[j]);
					continue;
				}
				if(node[node[to.front()].to[j]].cost > node[to.front()].cost + node[to.front()].ecost[j]){
					node[node[to.front()].to[j]].cost = node[to.front()].cost + node[to.front()].ecost[j];
					node[node[to.front()].to[j]].done=0;
					to.push(node[to.front()].to[j]);
					continue;
				}
			}
			to.pop();
		}
	}
}

Compiler output:
a.cc: In function 'void find(Node*, int, int)':
a.cc:85:43: error: expected ';' before '}' token
   85 |                 to.push(node[start].to[i])
      |                                           ^
      |                                           ;
   86 |         }
      |         ~
Language: C++

#!usr/bin/env python3

from collections import defaultdict


def main():


    fl = input().split(" ")
    V = int(fl[0])
    E = int(fl[1])
    R = int(fl[2])
    #Adjacency list
    G = defaultdict(list)
    for i in range(int(E)):
        s, t, w = [int(x) for x in input().split(" ")]
        G[s].append((t,w))
    #initialized
    d = {}
    INF = float('inf')
    #INF = 10001
    for i in range(V):
        d[i] = INF
    d[R] = 0
    q = [R]
    while q:

        u = q.pop(0)
        for v in G[u]:
            if d[v[0]] > d[u] + v[1]:
                d[v[0]] = d[u] + v[1]

                q.append(v[0])

    for k in range(V):
        if d[k] == float('inf'):
            
            print("INF")
        else:
            print(d[k])



if __name__ == '__main__':
    main()

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!usr/bin/env python3
      |  ^
a.cc:13:6: error: invalid preprocessing directive #Adjacency
   13 |     #Adjacency list
      |      ^~~~~~~~~
a.cc:18:6: error: invalid preprocessing directive #initialized
   18 |     #initialized
      |      ^~~~~~~~~~~
a.cc:20:17: warning: multi-character character constant [-Wmultichar]
   20 |     INF = float('inf')
      |                 ^~~~~
a.cc:21:6: error: invalid preprocessing directive #INF
   21 |     #INF = 10001
      |      ^~~
a.cc:36:26: warning: multi-character character constant [-Wmultichar]
   36 |         if d[k] == float('inf'):
      |                          ^~~~~
a.cc:44:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   44 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:3:1: error: 'from' does not name a type
    3 | from collections import defaultdict
      | ^~~~
a.cc:20:5: error: 'INF' does not name a type
   20 |     INF = float('inf')
      |     ^~~
Language: C++

from collections import defaultdict
from collections import deque
from sys import stdin

def sp(G,R,V):
    d = {}
    INF = float('inf')
    for i in range(V):
        d[i] = INF
    d[R] = 0
    q = deque([(R)])
    while q:
        u = q.popleft()
        for v in G[u]:
            if d[v[0]] > d[u] + v[1]:
                d[v[0]] = d[u] + v[1]
                q.append(v[0])
    return d


V, E, R = tuple(int(x) for x in stdin.readline().split(' '))
G = defaultdict(list)
for case in range(E):
    s, t, w = tuple(int(x) for x in stdin.readline().split(' '))
    G[s].append((t,w))
print(G)
d = sp(G, R, V)
for k in range(V):
        if d[k] == float('inf'):
            print("INF")
        else:
            print(d[k])

Compiler output:
a.cc:7:17: warning: multi-character character constant [-Wmultichar]
    7 |     INF = float('inf')
      |                 ^~~~~
a.cc:29:26: warning: multi-character character constant [-Wmultichar]
   29 |         if d[k] == float('inf'):
      |                          ^~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from collections import defaultdict
      | ^~~~
a.cc:7:5: error: 'INF' does not name a type
    7 |     INF = float('inf')
      |     ^~~
Language: C++

#include <iostream>  
using namespace std;  

const int MAX = 500000;
const int 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;

  
       }  
  
}  
  
   
  
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/cc6PFv4n.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/cc6PFv4n.o
a.cc:(.text+0xc5): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/cc6PFv4n.o
a.cc:(.text+0xe8): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/cc6PFv4n.o
a.cc:(.text+0x103): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/cc6PFv4n.o
a.cc:(.text+0x13a): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/cc6PFv4n.o
a.cc:(.text+0x155): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/cc6PFv4n.o
a.cc:(.text+0x171): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/cc6PFv4n.o
a.cc:(.text+0x1a6): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/cc6PFv4n.o
/tmp/cc6PFv4n.o: in function `main':
a.cc:(.text+0x2e8): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/cc6PFv4n.o
a.cc:(.text+0x333): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/cc6PFv4n.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>  
using namespace std;  

const long MAX = 500000;
const long 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;

  
       }  
  
}  
  
   
  
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/ccJFywaH.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/ccJFywaH.o
a.cc:(.text+0xc5): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccJFywaH.o
a.cc:(.text+0xe8): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccJFywaH.o
a.cc:(.text+0x103): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccJFywaH.o
a.cc:(.text+0x13a): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccJFywaH.o
a.cc:(.text+0x155): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccJFywaH.o
a.cc:(.text+0x171): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccJFywaH.o
a.cc:(.text+0x1a6): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccJFywaH.o
/tmp/ccJFywaH.o: in function `main':
a.cc:(.text+0x2e8): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccJFywaH.o
a.cc:(.text+0x333): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccJFywaH.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>  
using namespace std;  

const int MAX = 500000;
const int LEN = 100000;
  
long 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;

  
       }  
  
}  
  
   
  
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/ccoWP9m1.o: in function `myDijstra(int, int)':
a.cc:(.text+0x83): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccoWP9m1.o
a.cc:(.text+0xc8): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccoWP9m1.o
a.cc:(.text+0xeb): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccoWP9m1.o
a.cc:(.text+0x106): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccoWP9m1.o
a.cc:(.text+0x13d): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccoWP9m1.o
a.cc:(.text+0x158): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccoWP9m1.o
a.cc:(.text+0x174): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccoWP9m1.o
a.cc:(.text+0x1a9): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccoWP9m1.o
/tmp/ccoWP9m1.o: in function `main':
a.cc:(.text+0x2f2): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccoWP9m1.o
a.cc:(.text+0x33d): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccoWP9m1.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>  
using namespace std;  

const long MAX = 500000;
const long LEN = 100000;
  
long 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;

  
       }  
  
}  
  
   
  
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/ccWgyle4.o: in function `myDijstra(int, int)':
a.cc:(.text+0x83): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccWgyle4.o
a.cc:(.text+0xc8): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccWgyle4.o
a.cc:(.text+0xeb): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccWgyle4.o
a.cc:(.text+0x106): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccWgyle4.o
a.cc:(.text+0x13d): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccWgyle4.o
a.cc:(.text+0x158): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccWgyle4.o
a.cc:(.text+0x174): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccWgyle4.o
a.cc:(.text+0x1a9): relocation truncated to fit: R_X86_64_PC32 against symbol `mark' defined in .bss section in /tmp/ccWgyle4.o
/tmp/ccWgyle4.o: in function `main':
a.cc:(.text+0x2f2): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccWgyle4.o
a.cc:(.text+0x33d): relocation truncated to fit: R_X86_64_PC32 against symbol `dist' defined in .bss section in /tmp/ccWgyle4.o
collect2: error: ld returned 1 exit status