criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
using namespace std;
	vector<vector<int>>g;
	vector<bool> visited;
	int n,m;

void add_edge(int a,int b){
	g[a].push_back(b);
	g[b].push_back(a);
}

int dfs(int i,int dpt){
	int ret=0;
	if(dpt==n)return 1;
	visited[i]=true;
	for(auto&& w:g[i]){
	if(!visited[w])ret+=dfs(w,++dpt);
　　visited[i]=false;
	}
	return ret;
}


int main(){
	cin>>n>>m;
	g.resize(n);
	visited.assign(n,false);
	for(int i=0;i<m;i++){
	int a,b;cin>>a>>b;
	add_edge(--a,--b);	
	}
	cout<<dfs(0,1)<<endl;
}

Compiler output:
a.cc:18:1: error: extended character 　 is not valid in an identifier
   18 | 　　visited[i]=false;
      | ^
a.cc:18:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int dfs(int, int)':
a.cc:18:1: error: '\U00003000\U00003000visited' was not declared in this scope
   18 | 　　visited[i]=false;
      | ^~~~~~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>

#define REP(i,n) for(i=0;i<n;i++)

int iin() {
    int i;
    scanf("%d", &i);
    return i;
}

long long llin() {
    long long i;
    scanf("%lld", &i);
    return i;
}

double din() {
    double i;
    scanf("%lf", &i);
    return i;
}

char cin() {
    char c;
    scanf("%c", &c);
    return c;
}

void stin(char *s) {
    scanf("%s", s);
}

void iout(int i) {
    printf("%d\n", i);
}

void llout(long long i) {
    printf("%lld\n", i);
}

void dout(double i) {
    printf("%lf\n", i);
}

void cout(char c) {
    printf("%c\n", c);
}

void stout(char *s) {
    printf("%s\n", s);
}

int dfs(int v, int n, int **table, int *visited) {
    int all_visited = 1, i;

    REP(i,n) {
        if (!visited[i]) {
            all_visited = 0;
            break;
        }
    }

    if (all_visited) {
        return 1;
    }

    int count = 0;

    REP(i,n) {
        if (!table[v][i]) continue;
        if (visited[i]) continue;

        visited[i] = 1;
        count += dfs(i, n, table, visited);
        visited[i] = 0;
    }

    return count;
}

int main() {
    int n = iin(), m = iin(), i, a, b;
    int table[n][n];
    memset(table, 0, sizeof table);
    REP(i,m) {
        a = iin();
        b = iin();
        table[a - 1][b - 1] = 1;
        table[b - 1][a - 1] = 1;
    }
    int visited[N];
    memset(visited, 0, sizeof visited);
    int count = dfs(0, n, table, visited);
    iout(count);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:95:17: error: 'N' undeclared (first use in this function)
   95 |     int visited[N];
      |                 ^
main.c:95:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:97:27: error: passing argument 3 of 'dfs' from incompatible pointer type [-Wincompatible-pointer-types]
   97 |     int count = dfs(0, n, table, visited);
      |                           ^~~~~
      |                           |
      |                           int (*)[n]
main.c:57:29: note: expected 'int **' but argument is of type 'int (*)[n]'
   57 | int dfs(int v, int n, int **table, int *visited) {
      |                       ~~~~~~^~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>

#define REP(i,n) for(i=0;i<n;i++)

int iin() {
    int i;
    scanf("%d", &i);
    return i;
}

long long llin() {
    long long i;
    scanf("%lld", &i);
    return i;
}

double din() {
    double i;
    scanf("%lf", &i);
    return i;
}

char cin() {
    char c;
    scanf("%c", &c);
    return c;
}

void stin(char *s) {
    scanf("%s", s);
}

void iout(int i) {
    printf("%d\n", i);
}

void llout(long long i) {
    printf("%lld\n", i);
}

void dout(double i) {
    printf("%lf\n", i);
}

void cout(char c) {
    printf("%c\n", c);
}

void stout(char *s) {
    printf("%s\n", s);
}

int dfs(int v, int n, int **table, int *visited) {
    int all_visited = 1, i;

    REP(i,n) {
        if (!visited[i]) {
            all_visited = 0;
            break;
        }
    }

    if (all_visited) {
        return 1;
    }

    int count = 0;

    REP(i,n) {
        if (!table[v][i]) continue;
        if (visited[i]) continue;

        visited[i] = 1;
        count += dfs(i, n, table, visited);
        visited[i] = 0;
    }

    return count;
}

int main() {
    int n = iin(), m = iin(), i, a, b;
    int table[N][N];
    memset(table, 0, sizeof table);
    REP(i,m) {
        a = iin();
        b = iin();
        table[a - 1][b - 1] = 1;
        table[b - 1][a - 1] = 1;
    }
    int visited[N];
    memset(visited, 0, sizeof visited);
    int count = dfs(0, n, table, visited);
    iout(count);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:87:15: error: 'N' undeclared (first use in this function)
   87 |     int table[N][N];
      |               ^
main.c:87:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>

#define REP(i,n) for(i=0;i<n;i++)

int iin() {
    int i;
    scanf("%d", &i);
    return i;
}

long long llin() {
    long long i;
    scanf("%lld", &i);
    return i;
}

double din() {
    double i;
    scanf("%lf", &i);
    return i;
}

char cin() {
    char c;
    scanf("%c", &c);
    return c;
}

void stin(char *s) {
    scanf("%s", s);
}

void iout(int i) {
    printf("%d\n", i);
}

void llout(long long i) {
    printf("%lld\n", i);
}

void dout(double i) {
    printf("%lf\n", i);
}

void cout(char c) {
    printf("%c\n", c);
}

void stout(char *s) {
    printf("%s\n", s);
}

int dfs(int v, int n, int **table, int *visited) {
    int all_visited = 1, i;

    REP(i,n) {
        if (!visited[i]) {
            all_visited = 0;
            break;
        }
    }

    if (all_visited) {
        return 1;
    }

    int count = 0;

    REP(i,n) {
        if (!table[v][i]) continue;
        if (visited[i]) continue;

        visited[i] = true;
        count += dfs(i, n, table, visited);
        visited[i] = false;
    }

    return count;
}

int main() {
    int n = iin(), m = iin(), i, a, b;
    int table[N][N];
    memset(table, 0, sizeof table);
    REP(i,m) {
        a = iin();
        b = iin();
        table[a - 1][b - 1] = 1;
        table[b - 1][a - 1] = 1;
    }
    int visited[N];
    memset(visited, 0, sizeof visited);
    int count = dfs(0, n, table, visited);
    iout(count);
    return 0;
}


Compiler output:
main.c: In function 'dfs':
main.c:77:22: error: 'true' undeclared (first use in this function)
   77 |         visited[i] = true;
      |                      ^~~~
main.c:6:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    5 | #include <limits.h>
  +++ |+#include <stdbool.h>
    6 | 
main.c:77:22: note: each undeclared identifier is reported only once for each function it appears in
   77 |         visited[i] = true;
      |                      ^~~~
main.c:79:22: error: 'false' undeclared (first use in this function)
   79 |         visited[i] = false;
      |                      ^~~~~
main.c:79:22: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'main':
main.c:87:15: error: 'N' undeclared (first use in this function)
   87 |     int table[N][N];
      |               ^
Language: C

#include <stdio.h>
void DFS(int now, int *ans, int n, int visited[], int cango[][n]);
int main(void)
{
    int n,m,i,j,ans=0,now=0;
    scanf("%d%d", &n,&m);
    int a[m], b[m],cango[n][n], visited[n];
    for(i=0; i<m; i++) scanf("%d%d", &a[i], &b[i]);
    for(i=0; i<n; i++)
    {
        for(j=0; j<n; j++) cango[i][j]=0;
        visited[i]=0;
    }
    for(i=0; i<m; i++)
    {
        cango[a[i]-1][b[i]-1]=1;
        cango[b[i]-1][a[i]-1]=1;
    }
    visited[0]=1;
    DFS(now, &ans, n, visited[], cango[][]);
    printf("%d", ans);
    return 0;
}

void DFS(int now, int *ans, int n, int visited[], int cango[][n])//nが頂点数
{
    int i,flag=1,temp[n];
    for(i=0; i<n; i++) temp[i]=visited[i];//tempがvisitedになる
    for(i=0; i<n; i++)
    {
        if(temp[i]==0) flag=0;
    }
    if(flag==1) *ans++;
    else
    {
        for(i=0; i<n; i++)
        {
            if(temp[i]==0 && cango[now][i]==1)
            {
                temp[i]=1;
                DFS(i, ans, n, temp[], cango[][]);
                temp[i]=0;
            }
        }
    }
}

Compiler output:
main.c: In function 'main':
main.c:20:31: error: expected expression before ']' token
   20 |     DFS(now, &ans, n, visited[], cango[][]);
      |                               ^
main.c: In function 'DFS':
main.c:41:37: error: expected expression before ']' token
   41 |                 DFS(i, ans, n, temp[], cango[][]);
      |                                     ^
Language: C++

#include <vector>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,n) for(int i=0;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define ALL(a) (a).begin(),(a).end()

const int nmax=8;
bool graph[nmax][nmax];

int dfs(int v, int n, bool visited[nmax]) {
  bool all_visited = true;

  REP(i, n) {
    if(visited[i] == false) {
      all_visited = false;
    }
  }

  if(all_visited) {
    return 1;
  }

  int ret = 0;

  REP(i, n) {
    if(graph[v][i] == false) continue;
    if(visited[i]) continue;

    visited[i] = true;
    ret += dfs(i, N, visited);
    visited[i] = false;
  }

  return ret;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n,m;
  cin >> n >> m;
  REP(i, m) {
    int a,b;
    cin >> a >> b;
    graph[a-1][b-1] = graph[b-1][a-1] = true;
  }

  bool visited[nmax];
  REP(i, n) {
    visited[i] = true;
  }

  visited[0] = true;
  cout << dfs(0, n, visited) << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int dfs(int, int, bool*)':
a.cc:41:19: error: 'N' was not declared in this scope
   41 |     ret += dfs(i, N, visited);
      |                   ^
Language: C++

#include<iostream>
#include <fstream>
#include <vector>

using namespace std;

int counter = 0;
void findP(vector<int> points);
int n, m;
vector<pair<int, int>> edge;

int main()
{
#ifdef LOCAL
    std::ifstream in("input.txt");
    std::cin.rdbuf(in.rdbuf());
#endif
    cin >> n >> m;
    
    for(int i=0;i<m;i++){
        int p1, p2;
        cin >> p1 >> p2;
        edge.push_back({p1, p2});
    }

    vector<int> points = {1};
    findP(points);

    cout << counter << endl;

    return 0;
}
void findP(vector<int> points){
    if(points.size() >= n){
        counter++;
    }
    else{
        for(auto iter:edge){
            vector<int> tmpPoint = points;
            if(iter.first == tmpPoint[points.size()-1] && std::count(tmpPoint.begin(), tmpPoint.end(), iter.second) == 0){
                tmpPoint.push_back(iter.second);
                findP(tmpPoint);
            }
            else if(iter.second == tmpPoint[points.size()-1] && std::count(tmpPoint.begin(), tmpPoint.end(), iter.first) == 0){
                tmpPoint.push_back(iter.first);
                findP(tmpPoint);
            }
        }
    }
}

Compiler output:
a.cc: In function 'void findP(std::vector<int>)':
a.cc:40:64: error: 'count' is not a member of 'std'; did you mean 'cout'?
   40 |             if(iter.first == tmpPoint[points.size()-1] && std::count(tmpPoint.begin(), tmpPoint.end(), iter.second) == 0){
      |                                                                ^~~~~
      |                                                                cout
a.cc:44:70: error: 'count' is not a member of 'std'; did you mean 'cout'?
   44 |             else if(iter.second == tmpPoint[points.size()-1] && std::count(tmpPoint.begin(), tmpPoint.end(), iter.first) == 0){
      |                                                                      ^~~~~
      |                                                                      cout
Language: C++

#include <cstdio>
#include <vector>
using namespace std;

const int MAX_N = 8, MAX_M = MAX_N * (MAX_N - 1) / 2;

int N, M, a[MAX_M], b[MAX_M];

vector<int> graph[MAX_N];
bool used[MAX_N];

int dfs(int n) {
	used[n] = true;
	
	bool end = true;
	for (int i = 0; i < N; i++) {
		end &= used[i];
	}
	if (end) {
		used[n] = false;
		return 1;
	}

	int res = 0;
	for (int i = 0; i < graph[n].size(); i++) {
		if (!used[graph[n][i]]) {
			res += dfs(graph[n][i]);
		}
	}
	
	used[n] = false;
	return res;
}

void solve() {
	for (int i = 0; i < M; i++) {
		graph[a[i] - 1].push_back(b[i] - 1);
		graph[b[i] - 1].push_back(a[i] - 1);
	}

	memset(used, false, sizeof(used));

	int res = dfs(0);
	printf("%d\n", res);
}

int main() {
	scanf("%d %d", &N, &M);
	for (int i = 0; i < M; i++) {
		scanf("%d %d", &a[i], &b[i]);
	}

	solve();
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:41:9: error: 'memset' was not declared in this scope
   41 |         memset(used, false, sizeof(used));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <vector>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main() {
    int n, m;
    cin >> n >> m;
    vector<int> p(n);
    iota(p.begin(), p.end(), 0);
    int g[11][11];

    for (int i = 0; i < m; i++) {
        int x, y;
        cin >> x >> y;
        x--, y--;
        g[x][y] = g[y][x] = 1;
    }
    int ans = 0;
    do {
        bool f = true;
        if (p[0])
            break;
        for (int i = 1; i < n; i++) {
            if (g[p[i - 1]][p[i]] == 0)
                f = false;
        }
        if (f)
            ans++;
    } while (next_permutation(p.begin(), p.end()));

    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'iota' was not declared in this scope
   10 |     iota(p.begin(), p.end(), 0);
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#include <utility>
using namespace std;
typedef long long ll;

bool graph[8][8];
int dfs(int v, int N, bool visited[8]){
	bool all_visited = true;
	for (int i = 0;i < n;i++){
		if (visited[i]==false) all_visited = false;
	}

	if (all_visited = true) return 1;
	int ret;
	for (int i=0;i<n;i++){
		if (graph[v][i]==false) continue;
		if (visited[i]) continue;
		visited[i] = true;
		ret += dfs(i,N,visited);
		visited[i] = false;
	}
}

int main(){
	int n,m;
	cin >> n >> m;
	for (int i=0;i<m;i++){
		int a, b;
		cin >> a >> b;
		graph[a-1][b-1] = graph[b-1][a-1] = true;
	}
	bool visited[8];
	for (int i = 0;i < n;i++){
		visited[i]=false;
	}
	visited[0] = true;
	cout << dfs(0, n, visited) << endl;
}

Compiler output:
a.cc: In function 'int dfs(int, int, bool*)':
a.cc:9:28: error: 'n' was not declared in this scope
    9 |         for (int i = 0;i < n;i++){
      |                            ^
a.cc:15:24: error: 'n' was not declared in this scope
   15 |         for (int i=0;i<n;i++){
      |                        ^
a.cc:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
Language: C++

#include <iostream>

using namespace std;

const int nmax=8;
bool graph[nmax][nmax];

int dfs(int v, int N, bool visited[nmax]){

  bool all_visited = true;
  for (int i=0; i<N; ++i){
    if (visited[i] == false) all_visited = false;
  }

  if (all_visited){
    return 1;
  }

  ret = 0;

  for (int i=0; i<N; ++i){
    if (graph[v][i] == false) continue;
    if (visited[i]) continue;

    visited[i] = true;
    ret += dfs(i, N, visited);
    visited[i] = false;
  }

  return ret;
}

int main(){

  int N, M;
  cin >> N >> M;
  for (int i=0; i<M; ++i){
    int x, y;
    cin >> x >> y;
    graph[x-1][y-1] = graph[y-1][x-1] = true;
  }

  bool visited[nmax]();

  visited[0] = true;
  cout << dfs(0, N, vidited) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int dfs(int, int, bool*)':
a.cc:19:3: error: 'ret' was not declared in this scope
   19 |   ret = 0;
      |   ^~~
a.cc: In function 'int main()':
a.cc:43:8: error: declaration of 'visited' as array of functions
   43 |   bool visited[nmax]();
      |        ^~~~~~~
a.cc:45:3: error: 'visited' was not declared in this scope
   45 |   visited[0] = true;
      |   ^~~~~~~
a.cc:46:21: error: 'vidited' was not declared in this scope
   46 |   cout << dfs(0, N, vidited) << endl;
      |                     ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int n, m;
    cin >> n >> m;
    int a[50], b[50];
    int e[10][10];
    for(int i = 0; i < n; i++){
        for(int j = 0; j < n; j++){
            e[i][j] = 0;
        }
    }
    for(int i = 0; i < m; i++){
        cin >> a[i] >> b[i];
        a[i]--;
        b[i]--;
        e[a[i]][b[i]]++;
        e[b[i]][a[i]]++;
    }
    int ans = 0;
    int seq[10];
    for(int i = 0; i < n; i++){
        seq[i] = i;
    }
    do{
        bool f = true;
        for(int i = 0; i < n - 1; i++){
            if(e[seq[i]][seq[i + 1]] == 0){
                f = false;
            }
        }
        if(f){
            ans++;
        }
    }
    while(next_permutation(seq + 1, seq + n));
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:11: error: 'next_permutation' was not declared in this scope
   38 |     while(next_permutation(seq + 1, seq + n));
      |           ^~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <map>
#include <vector>
#include <stack>
#include <queue>

using namespace std;
typedef long long ll;
int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0};
int cnt=0;
int  N,M;
bool e[8][8]={false};

int dfs(int v,int N,bool c[8]){
    bool all = true;
    for(int i=0;i<N;i++){
        if(!c[i]) all=false;
    }
    if(all) return 1;
    int ret=0;
    for(int i=0;i<N;i++){
        //今見ている頂点とつながっていれば探索
        if(e[v][i]==false) continue;
        //すでに訪れていたら探索しない
        if(cc[i]) continue;
        //探す
        c[i]=true;
        ret+=dfs(i,N,c);
        c[i]=false;
    }
    return ret;
}

int main(){
    cin >> N >> M;
    for(int i=0;i<M;i++){
        int a,b; cin >> a >> b;
        e[a-1][b-1]=true;
        a[b-1][a-1]=true;
    }
    bool vv[8];
    for(int i=0;i<N;i++) vv[i] = true;
    vv[0]=true;
    cout << dfs(0,N,vv) << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int dfs(int, int, bool*)':
a.cc:29:12: error: 'cc' was not declared in this scope; did you mean 'c'?
   29 |         if(cc[i]) continue;
      |            ^~
      |            c
a.cc: In function 'int main()':
a.cc:43:10: error: invalid types 'int[int]' for array subscript
   43 |         a[b-1][a-1]=true;
      |          ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <tuple>
#include <stack>
using namespace std;

typedef unsigned long ul;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef pair<int,int> pint;
typedef vector<pint> vping;

#define rep(i,n) for(int i=0;i<n;i++)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define pf push_front

int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0,};


int N,M, cnt;
bool tree[8][8];
bool vst[8];
rep(i,8) vst[i]=false;


void dfs(int v, int num){
  if(num == N){
    cnt++;return;
  }
  vst[v] = true;
  rep(i,N){
    if(tree[v][i] && !vst[i]){
      dfs(i, num+1);
    }
  }
}



int main() {
  cin >> N >> M;
  rep(i,M){
    int a,b;
    cin >> a >> b;
    a--;b--;
    tree[a][b] = true;
    tree[b][a] = true;
  }

  dfs(0,1);


  cout << cnt << endl;



}


Compiler output:
a.cc:22:18: error: expected unqualified-id before 'for'
   22 | #define rep(i,n) for(int i=0;i<n;i++)
      |                  ^~~
a.cc:35:1: note: in expansion of macro 'rep'
   35 | rep(i,8) vst[i]=false;
      | ^~~
a.cc:35:5: error: 'i' does not name a type
   35 | rep(i,8) vst[i]=false;
      |     ^
a.cc:22:30: note: in definition of macro 'rep'
   22 | #define rep(i,n) for(int i=0;i<n;i++)
      |                              ^
a.cc:35:5: error: 'i' does not name a type
   35 | rep(i,8) vst[i]=false;
      |     ^
a.cc:22:34: note: in definition of macro 'rep'
   22 | #define rep(i,n) for(int i=0;i<n;i++)
      |                                  ^
Language: C++

#include <iostream>
using namespace std;

constexpr int MAX_N = 8;
int ab[MAX_N+1][MAX_N+1];
int idx[]{1,2,3,4,5,6,7,8};

int main() {
  int N, M;
  cin >> N >> M;
  for (int i{}; i < M; ++i) {
    int a, b;
    cin >> a >> b;
    ab[a][b] = ab[b][a] = true;
  }
  int ans{};
  sort(idx, idx + N); // 昇順にソートしておく必要あり
  do {
    bool path{true};
    for (int i{1}; i < N; ++i) {
      if (!ab[idx[i-1]][idx[i]]) {
        path = false;
        break;
      }
    }
    if (path)
      ++ans;
  } while (next_permutation(idx+1, idx + N));

  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   17 |   sort(idx, idx + N); // 昇順にソートしておく必要あり
      |   ^~~~
      |   short
a.cc:28:12: error: 'next_permutation' was not declared in this scope
   28 |   } while (next_permutation(idx+1, idx + N));
      |            ^~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include<iostream>
using namespace std;
vector<vector<bool>> graph(8, vector<bool>(8));

int DFS(int x,int N,vector<bool> visited){
  
  bool allvisited=true;
  for(int i=0;i<N;i++){
    if(visited(i) == false){
      allvisited=false;
    }
    if(allvisited){
      return 1;
    }
  }
  
  int sum = 0;
  for(int i=0; i<N;i++){
    if(graph.at(x).at(i)==false) continue;
    if(visited.at(i)==false) continue;
    visited.at(i) = true;
    sum+=DFS(i,N,visited);
    visited.at(i) = false;
  }
  return sum;
}


int main(void){
  int N,M;
  cin >> N >> M;
  
  for(int i=0;i<M;i++){
  int A,B;
  cin >> A >> B;
  graph.at(A-1).at(B-1)=graph.at(B-1).at(A-1)=true;
  }
  vector<bool> visited(8, true);
  for(int i=1;i<N;i++){
  visited.at(i)=false;
  }
  
  cout << DFS(0, N, visited) << endl;
}

Compiler output:
a.cc: In function 'int DFS(int, int, std::vector<bool>)':
a.cc:10:15: error: no match for call to '(std::vector<bool>) (int&)'
   10 |     if(visited(i) == false){
      |        ~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define bit(x) (1L << (x))
using ll = long long;
using namespace std;

using graph = vector<vector<int>>;

int main() {
  int n, m; cin >> n >> m;
  vector<int> a(m), b(m);
  graph g(n);

  REP(i, m){
    cin >> a[i] >> b[i];
    --a[i]; --b[i];
    g[a[i]].emplace_back(b[i]);
  }

  function<int(int, vector<bool>)> rec = [&](int s, vector<bool> vis){
    if(find(vis.begin(), vis.end(), false) == vis.end()) return 1;

    int ret = 0;
    for(const auto& next: g[s]){
      vector<bool> nv = vis;
      nv[s] = true;
      ret += rec(next, nv);
    }

    return ret;
  }

  cout << rec(0, vector<bool>(n, false)) << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:3: error: expected ',' or ';' before 'cout'
   35 |   cout << rec(0, vector<bool>(n, false)) << endl;
      |   ^~~~
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Main {

	private static int N = 0;
	private static int M = 0;
	private static int[][] abArray;
	private static Boolean[] flagArray;
	private static int count = 0;

	public static void main(String[] args) {

		try (Scanner sc = new Scanner(System.in)) {
			N = Integer.parseInt(sc.next());
			M = Integer.parseInt(sc.next());
			sc.nextLine();
			abArray = new int[M][2];
			flagArray = new Boolean[N];

			for (int i = 0; i < N; i++) {
				abArray[i][0] = Integer.parseInt(sc.next());
				abArray[i][1] = Integer.parseInt(sc.next());
				sc.nextLine();
				flagArray[i] = false;
			}
			exe(1);
			System.out.println(count);
		}
	}

	private static void exe(int now) {
		// nowは探索済み
		flagArray[now -1] = true;
		
		for (int i = 0; i < M; i++) {
			//toがnowでfrom値が探索済みでない
			if (abArray[i][0] == now && !flagArray[abArray[i][1] - 1]) {
				// fromへ飛ぶ
				exe(abArray[i][1]);
				//fromがnowでto値が探索済みでない
			} else if (abArray[i][1] == now && !flagArray[abArray[i][0] - 1]) {
				// toへ飛ぶ
				exe(abArray[i][0]);
			}
		}
		
		// 全て探索済みか？
		if(!Arrays.asList(flagArray).contains(false)) {
			count++;
		}
		// 探索済みでなくす
		flagArray[now -1] = false;
	}
}
}


Compiler output:
Main.java:56: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <utility>
#include <string>
#include <algorithm>
#include <cmath>

typedef long long ll;
#define INF 1e9

using namespace std;
int nmax = 8;
int graph[nmax][nmax];

int dfs(int v, int n, bool visited[nmax]){
    bool all_visited = true;

    for (int i = 0; i < n; i++){
        if(visited[i] == false)
        all_visited = false;
    }

    //辺を全部通ったら1を返す
    if(all_visited == true) return 1;

    int ret = 0;//回数
    for (int i = 0; i < n; i++){
        if(graph[v][i] == false) continue;//辺訪問済み
        if(visited[i]) continue; //点訪問済み

        visited[i] = true;
        ret += dfs(i, n, visited);
        visited[i] = false;//訪問前に再設定
    }
    return ret;
}

int main()
{
    int n, m;
    cin >> n >> m;

    for (int i = 0, i < m; i++){
        int a, b;
        graph[a - 1][b - 1] = graph[b - 1][a - 1] = true;
    }

    bool visited[nmax];
    for (int i = 0; i < n; i++){
        visited[i] = false;
    }

    visited[0] = true; //出発点

    cout << dfs(0, n, visited);
    return 0;
}

Compiler output:
a.cc:14:17: error: size of array 'graph' is not an integral constant-expression
   14 | int graph[nmax][nmax];
      |                 ^~~~
a.cc:14:11: error: size of array 'graph' is not an integral constant-expression
   14 | int graph[nmax][nmax];
      |           ^~~~
a.cc:16:36: error: size of array 'visited' is not an integral constant-expression
   16 | int dfs(int v, int n, bool visited[nmax]){
      |                                    ^~~~
a.cc: In function 'int main()':
a.cc:44:22: error: expected ';' before '<' token
   44 |     for (int i = 0, i < m; i++){
      |                      ^~
      |                      ;
a.cc:44:23: error: expected primary-expression before '<' token
   44 |     for (int i = 0, i < m; i++){
      |                       ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

bool graph[8][8]={};

int DFS (int v,int N,bool visited[8]/*訪れたノード*/){
    //最後かどうか確認する
    bool all_visited=true;
    for(int i=0;i<N;++i){
        if(visited[i]==false){
            all_visited=false;
        }
    }
    //最後だったら
    if(all_visited){
        return 1;
    }

    int ret=0;

    for(int i=0;i<N;++i){
        //道がなければ無視
        if(graph[v][i]==false)continue;
        //訪れたことがあればむし
        if(visited[i])continue;

        visited[i]=true;
        ret+=DFS(i,N,visited);
        visited[i]=false;
    }

    return res;
}

int main(){
    int N,M;
    cin>>N>>M;

    for(int i=0;i<M;++i){
        int A,B;
        cin>>A>>B;
        graph[A-1][B-1]=graph[B-1][A-1]=true;
    }

    bool visited[8]={};

    visited[0]=true;
    cout<<DFS(0,N,visited)<<endl;
    return 0;


}

Compiler output:
a.cc: In function 'int DFS(int, int, bool*)':
a.cc:34:12: error: 'res' was not declared in this scope; did you mean 'ret'?
   34 |     return res;
      |            ^~~
      |            ret
Language: C++

#include<cstdio>
#include<vector>
#include<queue>
using namespace std;
int N,M;
struct Edge
{
    int to;
    bool visited;
};
vector<Edge>V[10];
bool visited[10];
int ans;
void dfs(int x,int count)
{
    if(count==N-1)
    {
        ans++;
        return ;
    }
    visited[x]=true;
    for(int i=0;i<V[x].size();i++)
    {
        Edge e=V[x][i];
        if(!e.visited&&!visited[e.to])
        {
            V[x][i].visited=true;
            dfs(e.to,++count);
            visited[x]=false;
            return ;
        }
    }
    return ;
}
int main()
{
    scanf("%d%d",&N,&M);
    int u,v;
    Edge edge;
    for(int i=0;i<M;i++)
    {
        scanf("%d%d",&u,&v);
        edge.visited=false;
        edge.to=v;
        V[u].push_back(edge);
        edge.to=u;
        V[v].push_back(edge);
    }
    ans=0;
    memset(visited,false,sizeof(visited));
    for(int i=0;i<V[1].size();i++)
    {
        Edge e=V[1][i];
        visited[1]=true;
        V[1][i].visited=true;
        dfs(e.to,1);
        visited[1]=false;
    }
    printf("%d\n",ans);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:50:5: error: 'memset' was not declared in this scope
   50 |     memset(visited,false,sizeof(visited));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<queue>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

N,M = map(int,input().split())
T = {}
for i in range(M):
    a,b = map(int,input().split())
    if a not in T.keys():
        T[a] = []
    if b not in T.keys():
        T[b] = []
    T[a].append(b)
    T[b].append(a)

ans = 0
def dfs(graph,start,path):
    global ans
    global N
    path = path + [start]

    if len(path) == N:
        ans += 1

    for node in graph[start]:
        if node not in path:
            new = dfs(graph,node,path)

    return ans


print(dfs(T,1,[]))


Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N,M = map(int,input().split())
      | ^
a.cc:3:1: error: expected unqualified-id before 'for'
    3 | for i in range(M):
      | ^~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>

#define MAX_N 100
#define INF 100000
#define rep(i, n) for(int i=0; i<n; ++i)
#define REP(i, s, t) for(int i=s; i<=s; ++i)

using namespace std;

const int nmax=8;
bool graph[nmax][nmax];

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    int N, M;
    cin >> N >> M;

    rep(i, M)
    {
        int A, B;
        cin >> A >> B;
        graph[A-1][B-1]=graph[B-1][A-1]=true;
    }

    bool visited[nmax];
    rep(i, N) visited[i]=false;

    visited[0]=true;
    cout << dfs(0, N, visited) << endl;

    return 0;
}

int dfs(int v, int N, bool visited[nmax])
{
    bool all_visited=true;

    // if all points are visited, add 1 to answer
    rep(i, N)
    {
        if(visited[i]==false) all_visited=false;
    }
    if(all_visited) return 1;

    int ret=0;

    rep(i, N)
    {
        // adjacent && not visited
        if(graph[v][i]==false) continue;
        if(visited[i]) continue;

        visited[i]=true;
        ret+=dfs(i, N, visited);
        visited[i]=false;
    }

    return ret;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:13: error: 'dfs' was not declared in this scope
   35 |     cout << dfs(0, N, visited) << endl;
      |             ^~~
Language: C++

#include<iostream>
using namespace std;
int nmax=8;
bool graph[nmax][nmax];

int dfs(in v,int N,bool visited[nmax]){
  bool all_visited=true;
  for(int i=;i<n;i++){
    if(visited[i]==false)all_visited=false;
  }
  if(all_visited){
    return 1;
  }
  int ret=0;
  for(int i=0;i<N;i++){
    if(graph[v][i]==false)continue;
    if(visited[j])continue;
    visited[j]=true;
    ret+=dfs(i,N,visited);
    visited[j]=false;
  }
  return ret;
}

int main(){
  int N,M;
  cin>>N>>M;
  for(int i=0;i<M;i++){
    int a,b;
    cin>>a>>b;
    graph[a-1][b-1]=graph[b-1][a-1]=true;
  }
  bool visited[nmax];
  for(int i=0;i<n;i;+){
    visied[i]=false;
  }
  visied[0]=true;
  cout<<dfs(,N,visited)<<endl;
  return 0;
}


Compiler output:
a.cc:4:18: error: size of array 'graph' is not an integral constant-expression
    4 | bool graph[nmax][nmax];
      |                  ^~~~
a.cc:4:12: error: size of array 'graph' is not an integral constant-expression
    4 | bool graph[nmax][nmax];
      |            ^~~~
a.cc:6:9: error: 'in' was not declared in this scope; did you mean 'int'?
    6 | int dfs(in v,int N,bool visited[nmax]){
      |         ^~
      |         int
a.cc:6:14: error: expected primary-expression before 'int'
    6 | int dfs(in v,int N,bool visited[nmax]){
      |              ^~~
a.cc:6:20: error: expected primary-expression before 'bool'
    6 | int dfs(in v,int N,bool visited[nmax]){
      |                    ^~~~
a.cc:6:38: error: expression list treated as compound expression in initializer [-fpermissive]
    6 | int dfs(in v,int N,bool visited[nmax]){
      |                                      ^
a.cc: In function 'int main()':
a.cc:34:17: error: 'n' was not declared in this scope
   34 |   for(int i=0;i<n;i;+){
      |                 ^
a.cc:34:20: error: expected ')' before ';' token
   34 |   for(int i=0;i<n;i;+){
      |      ~             ^
      |                    )
a.cc:34:22: error: expected primary-expression before ')' token
   34 |   for(int i=0;i<n;i;+){
      |                      ^
a.cc:37:3: error: 'visied' was not declared in this scope; did you mean 'visited'?
   37 |   visied[0]=true;
      |   ^~~~~~
      |   visited
a.cc:38:13: error: expected primary-expression before ',' token
   38 |   cout<<dfs(,N,visited)<<endl;
      |             ^
a.cc:38:12: error: 'dfs' cannot be used as a function
   38 |   cout<<dfs(,N,visited)<<endl;
      |         ~~~^~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;
const int nmax=8;
bool graph[nmax][nmax]

int dfs(int v,int N, bool visited[nmax]) {
    
    bool all_visited=true;

    for (int i=0; i<N; ++i) {
        if (visited[i]==false) 
            all_visited=false;
    }

    if (all_visited){
        return 1;
    }

    int ret=0;

    for (int i=0; i<N; ++i) {
        if (graph[v][i]==false) continue;
        if (visited[i]) continue;

        visited[i]=true;
        ret+=dfs(i,N,visited);
        visited[i]=false;
    }

    return ret;
}

int main() {
    int N, M;

    for (int i = 0; i < M; i++) {
        int a, b;
        cin >> a >> b;
        graph[a-1][b-1] = graph[b-1][a-1] = true;
    }

    bool visited[nmax];
    for (int i=0; i<N; ++i) {
        visited[i] = false;
    }

    visited[0] =true;
    cout << dfs(0, N, visited) << endl;
    return 0;
}

Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int dfs(int v,int N, bool visited[nmax]) {
      | ^~~
a.cc: In function 'int main()':
a.cc:39:9: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   39 |         graph[a-1][b-1] = graph[b-1][a-1] = true;
      |         ^~~~~
      |         isgraph
a.cc:48:13: error: 'dfs' was not declared in this scope
   48 |     cout << dfs(0, N, visited) << endl;
      |             ^~~
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int ans;
bool visited[8];
bool all_visited;
vector<int> G[8];

void dfs(int cur, int n) {
    visited[cur] = true;
    all_visited = true;
    for (int i = 0; i < n; i++) {
        if (!visited[i]) {
            all_visited = false;
            break;
        }
    }
    if (all_visited) { ans++; }
    for (auto e: G[cur]) {
        if (!visited[e]) {
            dfs(e);
            visited[e] = false;
        }
    }
}

int main() {
    int n, m;
    cin >> n >> m;

    for (int i = 0; i < m; i++) {
        int s, t;
        cin >> s >> t;
        s--; t--;
        G[s].push_back(t);
        G[t].push_back(s);
    }

    dfs(0, n);

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:23:16: error: too few arguments to function 'void dfs(int, int)'
   23 |             dfs(e);
      |             ~~~^~~
a.cc:11:6: note: declared here
   11 | void dfs(int cur, int n) {
      |      ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <functional>
#include <numeric>
#include <list>
#include <set>
#include <map>
#include <cmath>

#define v_exists(elem, v) find(v.begin(),v.end(),elem)!=v.end()
#define s_exists(elem, s) s.find(elem)!=s.end()

using namespace std;
const int MOD = 1000000007;

long gcd(long a, long b) {
    return b == 0 ? a : gcd(b, a % b);
}

long lcm( long m, long n ){
	if ( ( 0 == m ) || ( 0 == n ) )
		return 0;

	return ((m / gcd(m, n)) * n);
}


long kake(long x, long y){
	return x * y % MOD;
}

long fact_mod(long x){
	long ans = x;
	x-=1;
	while(x>1){
		ans = ans * x % MOD;
		x-=1;
	}
	return ans;
}

int N,M,cnt;
int adj[8][8];
bool visited[8];


void dfs(int node){
	visited[node] = true;

	int passed = 0;
	for(int i=0; i<N; i++){
		passed += visited[i];
	}

	if(passed == N){
		cnt+=1;
	}

	for(int i=0; i<N; i++){

		if(adj[node][i]==1 && visited[i]==false){
			dfs(i);
			visited[i] = false;
		}
	}
}

int main(){

	memset(adj, 0, sizeof(adj));
	memset(visited, 0, sizeof(visited));
	cnt = 0;

	cin >> N >> M;

	for(int i=0; i<M; i++){
		int a,b;
		cin >> a >> b;
		adj[a-1][b-1] = 1;
		adj[b-1][a-1] = 1;
	}

	dfs(0);
	cout << cnt << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:72:9: error: 'memset' was not declared in this scope
   72 |         memset(adj, 0, sizeof(adj));
      |         ^~~~~~
a.cc:11:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   10 | #include <cmath>
  +++ |+#include <cstring>
   11 |
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<list>
#include<cmath>
#include<map>
using namespace std;
using ll = long long;
const int INF = 1e9;
#define rep(i,n)for(int i=0;i<n;++i)
#define p pair<int,int>
vector<int>used;
vector<int>connect;
int N, M;
vector<int>G[10];
vector<int>used(8, 0);
int ans = 0;

int dfs(int now, int depth) {
	if (depth == 0) {
		bool c = true;
		for (int i = 0; i < N; ++i) {
			if (used[i] == 0) {
				c = false;
			}
			if (c)ans++;
			used[now]--;
			return 0;
		}
	}
	for (int i = 0; i < G[now].size(); ++i) {
		used[G[now][i]]++;
		dfs(G[now][i], depth - 1);
	}
	used[now]--;
}
int main() {
	cin >> N >> M;
	for (int i = 0; i < M; ++i) {
		int a, b;
		cin >> a >> b;
		a--; b--;
		G[a].push_back(b);
		G[b].push_back(a);
	}
	used[0]++;
	dfs(0,N-1);
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:17:12: error: redefinition of 'std::vector<int> used'
   17 | vector<int>used(8, 0);
      |            ^~~~
a.cc:13:12: note: 'std::vector<int> used' previously declared here
   13 | vector<int>used;
      |            ^~~~
a.cc: In function 'int dfs(int, int)':
a.cc:36:18: warning: control reaches end of non-void function [-Wreturn-type]
   36 |         used[now]--;
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

typedef struct {
	bool to[8];
} node;

node _node[8];

int n,m;
int ans = 0;

void go(int now,int x[8],int cnt) {
	if (cnt == n) {
		ans++;
		return 0;
	}
	for(int i = 0;i < 8;i++) {
		if (x[_node[now].to[i]] = false) {
			int y[8];
			for (int j = 0;j < 8;j++) {
				y[j] = x[j];
			}
			y[_node[now].to[i]] = true;
			go(_node[now].to[i],y,cnt+1);
		}
	}
	return 0;
}

int main() {
	cin >> n >> m;
	for (int i = 0;i < 8;i++) {
		for (int j = 0;j < 8;j++) {
			_node[i].to[j] = false;
		}
	}
	for (int i = 0;i < m;i++) {
		int a,b;
		cin >> a >> b;
		_node[a-1].to[b-1] = true;
	}
	int start[8] = {false,false,false,false,false,false,false,false};
	go(0,start,0);
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'void go(int, int*, int)':
a.cc:18:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
   18 |                 return 0;
      |                        ^
a.cc:30:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   30 |         return 0;
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

typedef struct {
	bool to[8];
} node;

_node[8];

int n,m;
int ans = 0;

void go(int now,int x[8],int cnt) {
	if (cnt == n) {
		ans++;
		return 0;
	}
	for(int i = 0;i < 8;i++) {
		if (x[_node[now].to[i]] = false) {
			int y[8];
			for (int j = 0;j < 8;j++) {
				y[j] = x[j];
			}
			y[_node[now].to[i]] = true;
			go(_node[now].to[i],y,cnt+1);
		}
	}
	return 0;
}

int main() {
	cin >> n >> m;
	for (int i = 0;i < 8;i++) {
		for (int j = 0;j < 8;j++) {
			_node[i].to[j] = false;
		}
	}
	for (int i = 0;i < m;i++) {
		int a,b;
		cin >> a >> b;
		_node[a-1].to[b-1] = true;
	}
	int start[8] = {false,false,false,false,false,false,false,false};
	go(0,start,0);
	cout << ans << endl;
}

Compiler output:
a.cc:10:1: error: '_node' does not name a type; did you mean 'node'?
   10 | _node[8];
      | ^~~~~
      | node
a.cc: In function 'void go(int, int*, int)':
a.cc:18:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
   18 |                 return 0;
      |                        ^
a.cc:21:23: error: '_node' was not declared in this scope; did you mean 'node'?
   21 |                 if (x[_node[now].to[i]] = false) {
      |                       ^~~~~
      |                       node
a.cc:30:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   30 |         return 0;
      |                ^
a.cc: In function 'int main()':
a.cc:37:25: error: '_node' was not declared in this scope; did you mean 'node'?
   37 |                         _node[i].to[j] = false;
      |                         ^~~~~
      |                         node
a.cc:43:17: error: '_node' was not declared in this scope; did you mean 'node'?
   43 |                 _node[a-1].to[b-1] = true;
      |                 ^~~~~
      |                 node
Language: C++

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

typedef struct {
	bool to[8];
} node;

_node[8];

int n,m;
int ans = 0;

void go(int now,int x[8],int cnt) {
	if (cnt == n) {
		ans++;
		return 0;
	}
	for(int i = 0;i < 8;i++) {
		if (x[_node[now].to[i]] = false) {
			int y[8];
			for (int j = 0;j < 8;j++) {
				y[j] = x[j];
			}
			y[_node[now].to[i]] = true;
			go(_node[now].to[i],y,cnt+1);
		}
	}
	return 0;
}

int main() {
	cin >> n >> m;
	for (int i = 0;i < 8;i++) {
		for (int j = 0;j < 8;j++) {
			node[i].to[j] = false;
		}
	}
	for (int i = 0;i < m;i++) {
		int a,b;
		cin >> a >> b;
		node[a-1].to[b-1] = true;
	}
	int start[8] = {false,false,false,false,false,false,false,false};
	go(0,start,0);
	cout << ans << endl;
}

Compiler output:
a.cc:10:1: error: '_node' does not name a type; did you mean 'node'?
   10 | _node[8];
      | ^~~~~
      | node
a.cc: In function 'void go(int, int*, int)':
a.cc:18:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
   18 |                 return 0;
      |                        ^
a.cc:21:23: error: '_node' was not declared in this scope; did you mean 'node'?
   21 |                 if (x[_node[now].to[i]] = false) {
      |                       ^~~~~
      |                       node
a.cc:30:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   30 |         return 0;
      |                ^
a.cc: In function 'int main()':
a.cc:37:29: error: structured binding declaration cannot have type 'node'
   37 |                         node[i].to[j] = false;
      |                             ^~~
a.cc:37:29: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:37:32: error: expected initializer before '.' token
   37 |                         node[i].to[j] = false;
      |                                ^
a.cc:37:32: error: expected ';' before '.' token
a.cc:43:23: error: expected ']' before '-' token
   43 |                 node[a-1].to[b-1] = true;
      |                       ^
      |                       ]
a.cc:43:21: error: structured binding declaration cannot have type 'node'
   43 |                 node[a-1].to[b-1] = true;
      |                     ^
a.cc:43:21: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:43:22: error: conflicting declaration 'auto a'
   43 |                 node[a-1].to[b-1] = true;
      |                      ^
a.cc:41:21: note: previous declaration as 'int a'
   41 |                 int a,b;
      |                     ^
a.cc:43:26: error: expected initializer before '.' token
   43 |                 node[a-1].to[b-1] = true;
      |                          ^
Language: C++

#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

N, M = map(int, raw_input().split())
edge = [[False] * N for i in range(N)]

for i in range(M):
    a, b = map(int, raw_input().split())
    a, b = a - 1, b - 1
    edge[a][b] = True
    edge[b][a] = True

def func(num, used):
    if not True in used:
        return 1
    ret = 0
    for i in range(N):
        if used[i] and edge[num][i]:
            used[i] = False
            ret += func(i, used)
            used[i] = True
    return ret

print func(0, [False] + [True] * (N - 1))

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
a.cc:3:1: error: 'from' does not name a type
    3 | from collections import deque
      | ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <vector>
#include <climits>
#include <sstream>
 
using namespace std;

const int nmax = 8;

bool graph[nmax][nmax];

int dfs(int v, int N, bool visited[nmax]){

    bool all_visit = true;

    for(int i = 0; i < N; i++){
        if(visited[i] == false){
            all_visited = false;
        }
    }

    if(all_visited){
        return 1;
    }

    int ret = 0;

    for(int i = 0; i < N; i++){
        if(graph[v][i] == false) continue;
        if(visited[i]) continue;

        visited[i] = true;
        ret += dfs(i, N, visited);
        visited[i] = false;
    }

    return ret;
}

int main(){
    int N, M;
    cin >> N >> M;

    for(int i = 0; i < M; i++){
        int A, B;
        cin >> A >> B;
        graph[A-1][B-1] = graph[B-1][A-1] = true;
    }

    bool visited[nmax];
    for(int i = 0; i < N; i++){
        visited[i] = false;
    }

    visited[0] = true;

    cout << dfs(0, N, visited) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int dfs(int, int, bool*)':
a.cc:21:13: error: 'all_visited' was not declared in this scope; did you mean 'all_visit'?
   21 |             all_visited = false;
      |             ^~~~~~~~~~~
      |             all_visit
a.cc:25:8: error: 'all_visited' was not declared in this scope; did you mean 'all_visit'?
   25 |     if(all_visited){
      |        ^~~~~~~~~~~
      |        all_visit