Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)

const int MOD = 1000000007;
const int INF_32 = 1LL << 30;
const int64_t INF_64 = 1LL << 60;

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

typedef long long ll;

#define MAX_N 10000

struct Edge {
    int to;
    int weight;
    Edge(int t, int w)
        : to(t)
        , weight(w)
    {
    }
};
using Graph = vector<vector<int>>;
using Graph_e = vector<vector<Edge>>;

vector<int> dx = { 1, 0, -1, 0 };
vector<int> dy = { 0, 1, 0, -1 };
typedef pair<int, int> P;

// DFSを使って全探索

int dfs(int v, vector<bool>& seen, int& res)
{
    bool end = true;
    for (int i = 0; i < seen.size(); i++;)
        if (!seen[i] && i != v) // iにまだ行ってない&&次のvがiではない
            end = false;
    if (end) {
        ++res;
        return;
    }

    seen[v] = true;
    for (auto nv : G[v]) {
        if (seen[nv])
            continue;
        dfs(nv, seen, res);
    }
    seen[v] = false;
}
int main()
{
    int N, M;
    cin >> N >> M;
    Graph G(N);
    rep(i, M)
    {
        int a, b;
        cin >> a >> b;
        a--;
        b--;
        Graph[a].push_back(b);
        Graph[b].push_back(a);
    }

    vector<bool> seen(N, false);
    int res = 0;
    dfs(0, seen, res);
    cout << res << endl;
}


Compiler output:
a.cc: In function 'int dfs(int, std::vector<bool>&, int&)':
a.cc:55:41: error: expected ')' before ';' token
   55 |     for (int i = 0; i < seen.size(); i++;)
      |         ~                               ^
      |                                         )
a.cc:55:42: error: expected primary-expression before ')' token
   55 |     for (int i = 0; i < seen.size(); i++;)
      |                                          ^
a.cc:60:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   60 |         return;
      |         ^~~~~~
a.cc:64:20: error: 'G' was not declared in this scope
   64 |     for (auto nv : G[v]) {
      |                    ^
a.cc: In function 'int main()':
a.cc:82:14: error: structured binding declaration cannot have type 'Graph' {aka 'std::vector<std::vector<int> >'}
   82 |         Graph[a].push_back(b);
      |              ^~~
a.cc:82:14: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:82:15: error: conflicting declaration 'auto a'
   82 |         Graph[a].push_back(b);
      |               ^
a.cc:78:13: note: previous declaration as 'int a'
   78 |         int a, b;
      |             ^
a.cc:82:17: error: expected initializer before '.' token
   82 |         Graph[a].push_back(b);
      |                 ^
a.cc:83:14: error: structured binding declaration cannot have type 'Graph' {aka 'std::vector<std::vector<int> >'}
   83 |         Graph[b].push_back(a);
      |              ^~~
a.cc:83:14: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:83:15: error: conflicting declaration 'auto b'
   83 |         Graph[b].push_back(a);
      |               ^
a.cc:78:16: note: previous declaration as 'int b'
   78 |         int a, b;
      |                ^
a.cc:83:17: error: expected initializer before '.' token
   83 |         Graph[b].push_back(a);
      |                 ^
a.cc: In function 'int dfs(int, std::vector<bool>&, int&)':
a.cc:69:15: warning: control reaches end of non-void function [-Wreturn-type]
   69 |     seen[v] = false;
      |               ^~~~~