Language: C++

#include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<deque>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
using namespace std;

typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef long double ld;
const int inf=1e9+7;
const ll INF=1LL<<60 ;
const ll mod=1e9+7 ;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef complex<ld> Point;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ld, ld> LDP;
typedef pair<ll, ll> LP;
#define fr first
#define sc second
#define all(c) c.begin(),c.end()
#define pb push_back
#define debug(x)  cout << #x << " = " << (x) << endl;
using Graph = vector<vector<int> >;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define int long long

int n, m;
ll l;
struct edge{int to; ll c;};
vector<edge> G[330];

void solve() {
	cin >> n >> m >> l;
    rep(i, m) {
        int a, b; ll c;
        cin >> a >> b >> c;
        --a; --b;
        G[a].push_back(edge{b, c});
        G[b].push_back(edge{a, c});
    }
    int mini[330][330];
    rep(i, n) {
        rep(j, n) {
            mini[i][j] = INF;
        }
    }
    queue<tuple<int, ll, int>> que;
    rep(i, n) {
        que.push(make_tuple(i, l, 0));
        mini[i][i] = 0;
        while(que.size()) {
            tuple<int , ll, int> p = que.front(); que.pop();
            int v = get<0>(p);
            ll f = get<1>(p; int cnt = get<2>(p;
            for(auto nv: G[v]) {
                int to = nv.to; ll c = nv.c;
                int res; ll fu;
                if(c > f) {
                    res = cnt + 1;
                    fu = l - c;
                    se.insert(v);
                    mp[v] = i;
                    if(fu < 0) continue;
                } else {
                    res = cnt;
                    fu = f - c;
                }
                if(res <= mini[i][to]) {
                    que.push(make_tuple(to, fu, res));
                    mini[i][to] = res;
                }
            }

        }
    }

    int q; cin >> q;
    rep(i, q) {
        int s, t; cin >> s >> t;
        --s; --t;
        if(mini[s][t] == INF) {
            cout << -1 << endl;
        }else {
            cout << mini[s][t] << endl;
        }
    }
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(10);
	//init();
	solve();
	//cout << "finish" << endl;
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:79:28: error: expected ')' before ';' token
   79 |             ll f = get<1>(p; int cnt = get<2>(p;
      |                          ~ ^
      |                            )
a.cc:79:48: error: expected ')' before ';' token
   79 |             ll f = get<1>(p; int cnt = get<2>(p;
      |                                              ~ ^
      |                                                )
a.cc:86:21: error: 'se' was not declared in this scope; did you mean 'sc'?
   86 |                     se.insert(v);
      |                     ^~
      |                     sc
a.cc:87:21: error: 'mp' was not declared in this scope; did you mean 'p'?
   87 |                     mp[v] = i;
      |                     ^~
      |                     p