Language: C++

/#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;

map <int,int> mp;

#define INF (1<<30)
#define INFLL (1ll<<60)
#define EPS (1e-10)
static const int MAX=1e5;
static const int MOD=1e9+7;
static const int NMAX=50;
static const int MMAX=50;
int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0};

typedef pair<int, int> P; //最短距離,頂点の番号
struct edge{
    int to,cost;
};
int N;
vector<edge> G[MAX]; //
int d[MAX]; //最短距離

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


int main(){
    cin.tie(0);  ios::sync_with_stdio(false);
    
    int k,u;
    cin>>N;
    for(int i=0;i<N;i++){
        cin>>u>>k;
        for(int j=0;j<k;j++){
            edge e;
            cin>>e.to>>e.cost;
            G[u].push_back(e);
        }
    }
    dijkstra(0);
    for(int i=0;i<N;i++)
        cout<<i<<" "<<(d[i]==INF?-1:d[i])<<"\n";
    
    return 0;
    }



Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | /#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: expected unqualified-id before '/' token
    1 | /#include <bits/stdc++.h>
      | ^
a.cc:6:1: error: 'map' does not name a type
    6 | map <int,int> mp;
      | ^~~
a.cc:17:9: error: 'pair' does not name a type
   17 | typedef pair<int, int> P; //最短距離,頂点の番号
      |         ^~~~
a.cc:22:1: error: 'vector' does not name a type
   22 | vector<edge> G[MAX]; //
      | ^~~~~~
a.cc: In function 'void dijkstra(int)':
a.cc:26:5: error: 'priority_queue' was not declared in this scope
   26 |     priority_queue<P, vector<P>,greater<P> > que;
      |     ^~~~~~~~~~~~~~
a.cc:26:20: error: 'P' was not declared in this scope
   26 |     priority_queue<P, vector<P>,greater<P> > que;
      |                    ^
a.cc:26:23: error: 'vector' was not declared in this scope
   26 |     priority_queue<P, vector<P>,greater<P> > que;
      |                       ^~~~~~
a.cc:26:32: error: expected primary-expression before ',' token
   26 |     priority_queue<P, vector<P>,greater<P> > que;
      |                                ^
a.cc:26:33: error: 'greater' was not declared in this scope
   26 |     priority_queue<P, vector<P>,greater<P> > que;
      |                                 ^~~~~~~
a.cc:26:44: error: expected primary-expression before '>' token
   26 |     priority_queue<P, vector<P>,greater<P> > que;
      |                                            ^
a.cc:26:46: error: 'que' was not declared in this scope
   26 |     priority_queue<P, vector<P>,greater<P> > que;
      |                                              ^~~
a.cc:28:5: error: 'fill' was not declared in this scope
   28 |     fill(d,d+N,INF);
      |     ^~~~
a.cc:33:10: error: expected ';' before 'p'
   33 |         P p=que.top(); que.pop();
      |          ^~
      |          ;
a.cc:34:15: error: 'p' was not declared in this scope
   34 |         int v=p.second;
      |               ^
a.cc:37:23: error: 'G' was not declared in this scope
   37 |         for(int i=0;i<G[v].size();i++){
      |                       ^
a.cc: In function 'int main()':
a.cc:49:5: error: 'cin' was not declared in this scope
   49 |     cin.tie(0);  ios::sync_with_stdio(false);
      |     ^~~
a.cc:49:18: error: 'ios' has not been declared
   49 |     cin.tie(0);  ios::sync_with_stdio(false);
      |                  ^~~
a.cc:58:13: error: 'G' was not declared in this scope
   58 |             G[u].push_back(e);
      |             ^
a.cc:63:9: error: 'cout' was not declared in this scope
   63 |         cout<<i<<" "<<(d[i]==INF?-1:d[i])<<"\n";
      |         ^~~~