Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <climits>
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:10:22: error: invalid declarator before 'Edges'
   10 | typedef vector<Edge> Edges;
      |                      ^~~~~
a.cc:11:16: error: 'Edges' was not declared in this scope; did you mean 'Edge'?
   11 | typedef vector<Edges> Graph;
      |                ^~~~~
      |                Edge
a.cc:11:21: error: template argument 1 is invalid
   11 | typedef vector<Edges> Graph;
      |                     ^
a.cc:11:21: error: template argument 2 is invalid
a.cc: In function 'int main()':
a.cc:22:5: error: request for member 'resize' in 'G', which is of non-class type 'Graph' {aka 'int'}
   22 |   G.resize(V);
      |     ^~~~~~
a.cc:25:10: error: structured binding declaration cannot have type 'Graph' {aka 'int'}
   25 |     Graph[s].push_back((Edge){t, d});
      |          ^~~
a.cc:25:10: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:25:11: error: conflicting declaration 'auto s'
   25 |     Graph[s].push_back((Edge){t, d});
      |           ^
a.cc:24:9: note: previous declaration as 'int s'
   24 |     int s, t, d; cin >> s >> t >> d;
      |         ^
a.cc:25:13: error: expected initializer before '.' token
   25 |     Graph[s].push_back((Edge){t, d});
      |             ^
a.cc:25:36: error: expected primary-expression before ')' token
   25 |     Graph[s].push_back((Edge){t, d});
      |                                    ^
a.cc:28:12: error: 'N' was not declared in this scope
   28 |   int dist[N]; fill(dist, dist+N, INF);
      |            ^
a.cc:28:21: error: 'dist' was not declared in this scope
   28 |   int dist[N]; fill(dist, dist+N, INF);
      |                     ^~~~
a.cc:36:21: error: invalid types 'Graph {aka int}[const int]' for array subscript
   36 |     for(int i=0; i<G[now].size(); i++) {
      |                     ^
a.cc:37:25: error: invalid types 'Graph {aka int}[const int]' for array subscript
   37 |       const int next = G[now][i].to;
      |                         ^
a.cc:38:29: error: invalid types 'Graph {aka int}[const int]' for array subscript
   38 |       if(dist[next] > cost+G[now][i].cost) {
      |                             ^
a.cc:39:28: error: invalid types 'Graph {aka int}[const int]' for array subscript
   39 |         dist[next] = cost+G[now][i].cost;
      |                            ^