Language: C++

/**
 * Created by hiramekun at 19:22 on 2019-08-26.
 */
#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using P = pair<ll, ll>;
template<typename T> using pq = priority_queue<T>;
template<typename T> using minpq = priority_queue<T, vector<T>, greater<T>>;
template<typename T, typename K> using ump = unordered_map<T, K>;
const ll dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
const ll mod = 1000000007;
const ll inf = ll(1e9);
const ll e5 = ll(1e5);
const ll ll_inf = ll(1e9) * ll(1e9);

#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define repr(i, n) for(ll i = ll(n - 1); i >= 0; i--)
#define each(i, mp) for(auto& i:mp)
#define eb emplace_back
#define F first
#define S second
#define all(obj) (obj).begin(), (obj).end()

template<class T>
ostream &operator<<(ostream &out, const vector<T> &list) {
    ll n = list.size();
    rep(i, n) out << list[i] << ' ';
    return out;
}


template<class T>
istream &operator>>(istream &in, vector<T> &list) {
    ll n = list.size();
    rep(i, n) in >> list[i];
    return in;
}

template<class T>
ostream &operator<<(ostream &out, const vector<vector<T>> &list) {
    ll n = list.size();
    rep(i, n) out << list[i] << '\n';
    return out;
}

/* ------------- ANSWER ------------- */
/* ---------------------------------- */

void solve() {
    ll n, m, s, t;
    cin >> n >> m;

    vector<ll> G[n * 3];

    rep(i, m) {
        ll u, v;
        cin >> u >> v;
        u--, v--;
        G[u].eb(v * 2);
        G[u * 2].eb(v * 3);
        G[u * 3].eb(v);
    }
    cin >> s >> t;
    s--, t--;

    vector<bool> seen(n * 3);

    auto dfs = [&](auto &&f, ll now, ll c) -> void {
        if (now == t) {
            cout << t << '\n';
            exit(0);
        }
        seen[now] = true;
        each(e, G[now]) {
            if (!seen[e]) {
                f(f, e, c + 1);
            }
        }
    };
    
    dfs(dfs, s, 1);
    
    cout << -1 << '\n';
}

int main() {
#ifdef MY_DEBUG
    while (true) {
#endif
        solve();
#ifdef MY_DEBUG
    }
#endif
    return 0;
}



Compiler output:
a.cc: In function 'void solve()':
a.cc:73:16: error: use of deleted function 'solve()::<lambda(auto:28&&, ll, ll)>::~<lambda>()'
   73 |     auto dfs = [&](auto &&f, ll now, ll c) -> void {
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   74 |         if (now == t) {
      |         ~~~~~~~~~~~~~~~
   75 |             cout << t << '\n';
      |             ~~~~~~~~~~~~~~~~~~
   76 |             exit(0);
      |             ~~~~~~~~
   77 |         }
      |         ~       
   78 |         seen[now] = true;
      |         ~~~~~~~~~~~~~~~~~
   79 |         each(e, G[now]) {
      |         ~~~~~~~~~~~~~~~~~
   80 |             if (!seen[e]) {
      |             ~~~~~~~~~~~~~~~
   81 |                 f(f, e, c + 1);
      |                 ~~~~~~~~~~~~~~~
   82 |             }
      |             ~   
   83 |         }
      |         ~       
   84 |     };
      |     ~           
a.cc:73:18: note: 'solve()::<lambda(auto:28&&, ll, ll)>::~<lambda>()' is implicitly deleted because the default definition would be ill-formed:
   73 |     auto dfs = [&](auto &&f, ll now, ll c) -> void {
      |                  ^