Language: C++

#include <bits/stdc++.h>

using namespace std;

using P = pair<ll, ll>;
typedef long long ll;
#define rep(i, n) for(ll i=0;i<(ll)(n);i++)
#define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++)
#define INF 1000000000

template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

// nCr
ll comb(int n, int r)
{
	if (n < 0 || r < 0 || r > n) {
		return 0;
	}

	if (n - r < r) r = n - r;
	if (r == 0) return 1;
	if (r == 1) return n;

	vector<ll> numerator(r);
	vector<ll> denominator(r);

	for (ll k = 0; k < r; k++)
	{
		numerator[k] = n - r + k + 1;
		denominator[k] = k + 1;
	}

	for (int p = 2; p <= r; p++)
	{
		int pivot = denominator[p - 1];
		if (pivot > 1)
		{
			int offset = (n - r) % p;
			for (int k = p - 1; k < r; k += p)
			{
				numerator[k - offset] /= pivot;
				denominator[k] /= pivot;
			}
		}
	}

	ll result = 1;
	for (int k = 0; k < r; k++)
	{
		if (numerator[k] > 1) result *= numerator[k];
	}

	return result;
}

// 最大公約数
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}

// 最小公倍数
ll lcm(ll a, ll b) {
	return a * b / gcd(a, b);
}

// 素数判定
bool is_prime(ll n) {
	if (n == 1) return false;
	for (int i = 2; i * i <= n; ++i) {
		if (n % i == 0) return false;
	}
	return true;
}

// 階乗
ll factorial(ll k) {
	ll sum = 1;
	for (ll i = 1; i <= k; ++i)
	{
		sum *= i;
	}
	return sum;
}

// 素因数分解
map<ll, ll> prime_factor(ll n) {
	map<ll, ll> ret;
	for (ll i = 2; i * i <= n; i++) {
		while (n % i == 0) {
			ret[i]++;
			n /= i;
		}
	}
	if (n != 1) ret[n] = 1;
	return ret;
}

// D桁
//cout << fixed;
//cout << setprecision(2) << 3.141; // "3.14"

template<class T>
inline bool chmax(T& a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}

template<class T>
inline bool chmin(T& a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}

// 最短経路問題
#define FROM 100001
#define TO 100001
#define COST INF
ll d[FROM][TO] = { { COST } };
void warshall_floyd(ll n) {
	rep(k, n) {			// 経由する頂点
		rep(i, n) {		// 始点
			rep(j, n) {	// 終点
				d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
			}
		}
	}
}

#define MAX_V 10
struct edge {
	int to;
	int cost;
};
int V;
vector<edge> G[MAX_V];
int d[MAX_V];

void dijkstra(int s) {
	priority_queue<P, vector<P>, greater<P> > que;
	fill(d, d + V, 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));
			}
		}
	}
}

// union by size + path having
class UnionFind {
public:
	vector <ll> par; // 各元の親を表す配列
	vector <ll> siz; // 素集合のサイズを表す配列(1 で初期化)

	// Constructor
	UnionFind(ll sz_) : par(sz_), siz(sz_, 1LL) {
		for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
	}
	void init(ll sz_) {
		par.resize(sz_);
		siz.assign(sz_, 1LL);  // resize だとなぜか初期化されなかった
		for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
	}

	// Member Function
	// Find
	ll root(ll x) { // 根の検索
		while (par[x] != x) {
			x = par[x] = par[par[x]]; // x の親の親を x の親とする
		}
		return x;
	}

	// Union(Unite, Merge)
	bool merge(ll x, ll y) {
		x = root(x);
		y = root(y);
		if (x == y) return false;
		// merge technique（データ構造をマージするテク．小を大にくっつける）
		if (siz[x] < siz[y]) swap(x, y);
		siz[x] += siz[y];
		par[y] = x;
		return true;
	}

	bool issame(ll x, ll y) { // 連結判定
		return root(x) == root(y);
	}

	ll size(ll x) { // 素集合のサイズ
		return siz[root(x)];
	}
};

Compiler output:
a.cc:5:16: error: 'll' was not declared in this scope
    5 | using P = pair<ll, ll>;
      |                ^~
a.cc:5:20: error: 'll' was not declared in this scope
    5 | using P = pair<ll, ll>;
      |                    ^~
a.cc:5:22: error: template argument 1 is invalid
    5 | using P = pair<ll, ll>;
      |                      ^
a.cc:5:22: error: template argument 2 is invalid
a.cc:144:5: error: conflicting declaration 'int d [10]'
  144 | int d[MAX_V];
      |     ^
a.cc:126:4: note: previous declaration as 'll d [100001][100001]'
  126 | ll d[FROM][TO] = { { COST } };
      |    ^
a.cc: In function 'void dijkstra(int)':
a.cc:147:24: error: 'P' was not declared in this scope
  147 |         priority_queue<P, vector<P>, greater<P> > que;
      |                        ^
a.cc:147:35: error: template argument 2 is invalid
  147 |         priority_queue<P, vector<P>, greater<P> > que;
      |                                   ^
a.cc:147:49: error: template argument 1 is invalid
  147 |         priority_queue<P, vector<P>, greater<P> > que;
      |                                                 ^
a.cc:147:49: error: template argument 2 is invalid
a.cc:147:49: error: template argument 3 is invalid
a.cc:149:14: error: incompatible types in assignment of 'int' to 'll [100001]' {aka 'long long int [100001]'}
  149 |         d[s] = 0;
      |         ~~~~~^~~
a.cc:150:13: error: request for member 'push' in 'que', which is of non-class type 'int'
  150 |         que.push(P(0, s));
      |             ^~~~
a.cc:152:21: error: request for member 'empty' in 'que', which is of non-class type 'int'
  152 |         while (!que.empty()) {
      |                     ^~~~~
a.cc:153:18: error: expected ';' before 'p'
  153 |                 P p = que.top();
      |                  ^~
      |                  ;
a.cc:154:21: error: request for member 'pop' in 'que', which is of non-class type 'int'
  154 |                 que.pop();
      |                     ^~~
a.cc:155:25: error: 'p' was not declared in this scope
  155 |                 int v = p.second;
      |                         ^
a.cc:161:41: error: incompatible types in assignment of 'll*' {aka 'long long int*'} to 'll [100001]' {aka 'long long int [100001]'}
  161 |                                 d[e.to] = d[v] + e.cost;
      |                                 ~~~~~~~~^~~~~~~~~~~~~~~
a.cc:162:37: error: request for member 'push' in 'que', which is of non-class type 'int'
  162 |                                 que.push(P(d[e.to], e.to));
      |                                     ^~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: In instantiation of 'typename __gnu_cxx::__enable_if<std::__is_scalar<_Tp>::__value, void>::__type std::__fill_a1(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int (*)[100001]; _Tp = int; typename __gnu_cxx::__enable_if<__is_scalar<_Tp>::__value, void>::__type = void]':
/usr/include/c++/14/bits/stl_algobase.h:998:21:   required from 'void std::__fill_a(_FIte, _FIte, const _Tp&) [with _FIte = long long int (*)[100001]; _Tp = int]'
  998 |     { std::__fill_a1(__first, __last, __value); }
      |       ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:1029:20:   required from 'void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = long long int (*)[100001]; _Tp = int]'
 1029 |       std::__fill_a(__first, __last, __value);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:148:6:   required from here
  148 |         fill(d, d + V, INF);
      |         ~~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:952:18: error: incompatible types in assignment of 'const int' to 'long long int [100001]'
  952 |         *__first = __tmp;
      |         ~~~~~~~~~^~~~~~~