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:6:22: error: invalid declarator before 'Edges'
    6 | typedef vector<Edge> Edges;
      |                      ^~~~~
a.cc:7:16: error: 'Edges' was not declared in this scope; did you mean 'Edge'?
    7 | typedef vector<Edges> Graph;
      |                ^~~~~
      |                Edge
a.cc:7:21: error: template argument 1 is invalid
    7 | typedef vector<Edges> Graph;
      |                     ^
a.cc:7:21: error: template argument 2 is invalid
a.cc: In function 'int main()':
a.cc:18:5: error: request for member 'resize' in 'G', which is of non-class type 'Graph' {aka 'int'}
   18 |   G.resize(V);
      |     ^~~~~~
a.cc:21:10: error: structured binding declaration cannot have type 'Graph' {aka 'int'}
   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);
      |                     ^~~~
a.cc:32:21: error: invalid types 'Graph {aka int}[const int]' for array subscript
   32 |     for(int i=0; i<G[now].size(); i++) {
      |                     ^
a.cc:33:25: error: invalid types 'Graph {aka int}[const int]' for array subscript
   33 |       const int next = G[now][i].to;
      |                         ^
a.cc:34:29: error: invalid types 'Graph {aka int}[const int]' for array subscript
   34 |       if(dist[next] > cost+G[now][i].cost) {
      |                             ^
a.cc:35:28: error: invalid types 'Graph {aka int}[const int]' for array subscript
   35 |         dist[next] = cost+G[now][i].cost;
      |                            ^