Language: C++

#include <queue>
#include <cstdio>
#include <vector>
int V, E, s, t, p, q, d[100]; vector<int> G[100];
int main() {
	scanf("%d%d", &V, &E);
	for(int i = 0; i < V; i++) {
		scanf("%d%d", &s, &t);
		for(int j = 0; j < t; j++) {
			scanf("%d%d", &p, &q);
			G[i].push_back(make_pair(p, q));
		}
	}
	for(int i = 1; i < V; i++) d[i] = 999999999;
	priority_queue<pair<int, int> > que; que.push(make_pair(0, 0));
	while(!que.empty()) {
		int v = que.top().second; que.pop();
		for(int i = 0; i < G[v].size(); i++) {
			int u = G[v][i].first, w = G[v][i].second;
			if(d[u] > d[v] + w) {
				d[u] = d[v] + w;
				que.push(make_pair(-d[u], u));
			}
		}
	}
	for(int i = 0; i < V; i++) printf("%d %d\n", i, d[i]);
	return 0;
}

Compiler output:
a.cc:4:31: error: 'vector' does not name a type
    4 | int V, E, s, t, p, q, d[100]; vector<int> G[100];
      |                               ^~~~~~
a.cc: In function 'int main()':
a.cc:11:25: error: 'G' was not declared in this scope
   11 |                         G[i].push_back(make_pair(p, q));
      |                         ^
a.cc:11:40: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   11 |                         G[i].push_back(make_pair(p, q));
      |                                        ^~~~~~~~~
      |                                        std::make_pair
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/deque:62,
                 from /usr/include/c++/14/queue:62,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: 'std::make_pair' declared here
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
a.cc:15:9: error: 'priority_queue' was not declared in this scope; did you mean 'std::priority_queue'?
   15 |         priority_queue<pair<int, int> > que; que.push(make_pair(0, 0));
      |         ^~~~~~~~~~~~~~
      |         std::priority_queue
In file included from /usr/include/c++/14/queue:66:
/usr/include/c++/14/bits/stl_queue.h:496:11: note: 'std::priority_queue' declared here
  496 |     class priority_queue
      |           ^~~~~~~~~~~~~~
a.cc:15:24: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
   15 |         priority_queue<pair<int, int> > que; que.push(make_pair(0, 0));
      |                        ^~~~
      |                        std::pair
/usr/include/c++/14/bits/stl_pair.h:89:12: note: 'std::pair' declared here
   89 |     struct pair;
      |            ^~~~
a.cc:15:29: error: expected primary-expression before 'int'
   15 |         priority_queue<pair<int, int> > que; que.push(make_pair(0, 0));
      |                             ^~~
a.cc:15:46: error: 'que' was not declared in this scope
   15 |         priority_queue<pair<int, int> > que; que.push(make_pair(0, 0));
      |                                              ^~~
a.cc:15:55: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
   15 |         priority_queue<pair<int, int> > que; que.push(make_pair(0, 0));
      |                                                       ^~~~~~~~~
      |                                                       std::make_pair
/usr/include/c++/14/bits/stl_pair.h:1132:5: note: 'std::make_pair' declared here
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |     ^~~~~~~~~
a.cc:18:36: error: 'G' was not declared in this scope
   18 |                 for(int i = 0; i < G[v].size(); i++) {
      |                                    ^
a.cc:20:42: error: 'w' was not declared in this scope
   20 |                         if(d[u] > d[v] + w) {
      |                                          ^