Language: C++

#include<iostream>
#include<queue>
#include<functional>
#include<algorithm>
#include<vector>
using namespace std;
#define MAX_N 150000
#define INF 100000000000000
priority_queue<pair<long long, int>, vector<pair<long long, int>>, greater<pair<long long, int>>>Q;
vector<int, long long>X;
int N, M, A, B, C, O;
long long dist[MAX_N];
void dijkstra() {
	for (int i = 0; i < MAX_N; i++) {
		dist[i] = INF;
	}
	Q.push(make_pair(0, O)); dist[O] = 0;
	while (!Q.empty()) {
		if (Q.size() >= 10000000) { cout << "NEGATIVE CYCLE" << endl; return; }
		pair<int, long long>pa = Q.top(); Q.pop();
		for (int i = 0; i < X[pa.first].size(); i++) {
			int to = X[pa.first][i].first;
			if (dist[to] > pa.second + X[pa.first][i].second) {
				dist[to] = pa.second + X[pa.first][i].second;
				Q.push(make_pair(dist[to], to));
			}
		}
	}
	for (int i = 0; i < N; i++) {
		if (dist[i] == INF) { cout << "INF" << endl; }
		else { cout << dist[i] << endl; }
	}
	return;
}
int main() {
	cin >> N >> M >> O;
	for (int i = 0; i < M; i++) {
		cin >> A >> B >> C;
		X[A].push_back(make_pair(B, C));
	}
	dijkstra();
	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/queue:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'struct std::_Vector_base<int, long long int>':
/usr/include/c++/14/bits/stl_vector.h:428:11:   required from 'class std::vector<int, long long int>'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
a.cc:10:23:   required from here
   10 | vector<int, long long>X;
      |                       ^
/usr/include/c++/14/bits/stl_vector.h:87:28: error: 'long long int' is not a class, struct, or union type
   87 |         rebind<_Tp>::other _Tp_alloc_type;
      |                            ^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:89:9: error: 'long long int' is not a class, struct, or union type
   89 |         pointer;
      |         ^~~~~~~
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'class std::vector<int, long long int>':
a.cc:10:23:   required from here
   10 | vector<int, long long>X;
      |                       ^
/usr/include/c++/14/bits/stl_vector.h:518:20: error: '_M_allocate' has not been declared in 'std::vector<int, long long int>::_Base'
  518 |       using _Base::_M_allocate;
      |                    ^~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:519:20: error: '_M_deallocate' has not been declared in 'std::vector<int, long long int>::_Base'
  519 |       using _Base::_M_deallocate;
      |                    ^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:521:20: error: '_M_get_Tp_allocator' has not been declared in 'std::vector<int, long long int>::_Base'
  521 |       using _Base::_M_get_Tp_allocator;
      |                    ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/requires_hosted.h:31,
                 from /usr/include/c++/14/iostream:38,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = int; _Alloc = long long int]':
a.cc:10:23:   required from here
   10 | vector<int, long long>X;
      |                       ^
/usr/include/c++/14/bits/stl_vector.h:136:24: error: 'long long int' is not a class, struct, or union type
  136 |         _Vector_impl() _GLIBCXX_NOEXCEPT_IF(
      |                        ^~~~~~~~~~~~~~~~~~~~
a.cc: In function 'void dijkstra()':
a.cc:21:38: error: no match for 'operator[]' (operand types are 'std::vector<int, long long int>' and 'int')
   21 |                 for (int i = 0; i < X[pa.first].size(); i++) {
      |                                      ^
a.cc:22:35: error: no match for 'operator[]' (operand types are 'std::vector<int, long long int>' and 'int')
   22 |                         int to = X[pa.first][i].first;
      |                                   ^
a.cc:23:53: error: no match for 'operator[]' (operand types are 'std::vector<int, long long int>' and 'int')
   23 |                         if (dist[to] > pa.second + X[pa.first][i].second) {
      |                                                     ^
a.cc:24:57: error: no match for 'operator[]' (operand types are 'std::vector<int, long long int>' and 'int')
   24 |                                 dist[to] = pa.second + X[pa.first][i].second;
      |                                                         ^
a.cc: In function 'int main()':
a.cc:39:18: error: no match for 'operator[]' (operand types are 'std::vector<int, long long int>' and 'int')
   39 |                 X[A].push_back(make_pair(B, C));
      |                  ^
/usr/include/c++/14/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_Vector_impl() [with _Tp = int; _Alloc = long long int]':
/usr/include/c++/14/bits/stl_vector.h:314:7:   required from here
  314 |       _Vector_base() = default;
      |       ^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:141:26: error: 'long long int' is not a class, struct, or union type
  141 |         : _Tp_alloc_type()
      |                          ^