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

#include <bits/stdc++.h>
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;

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

  }
  return ret;
}

int main(void)
{
  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:25:5: error: 'visietd' was not declared in this scope; did you mean 'visited'?
   25 |     visietd[i] = true;
      |     ^~~~~~~
      |     visited
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define REP(i, s) for (int i = 0; i < s; ++i)
#define ALL(v) (v).begin(), (v).end()
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define DEBUG
#define int long long
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; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T> ostream& operator << (ostream &s, set<T> P)
{ EACH(it, P) { s << "<" << *it << "> "; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }
template<class T>void show(vector <T> v){for (int i = 0; i < v.size(); i++){cerr<<v[i]<<" ";}cerr<<"\n";}
typedef long long ll;

bool graph[10][10];
signed main(){
    int n,m;
    cin>>n>>m;
    
    graph.assign(n,vector<int>());
    for (int i = 0; i < m; i++)
    {
        int a,b;
        cin>>a>>b;
        a--,b--;
        graph[a][b]=true;
        
    }
    vector<int>v;
    REP(i,n) v.push_back(i);
    int cnt=0;
    do{
        
        if(v[0]!=0) continue;
        bool flag=true;
        for (int i = 0; i < n-1; i++)
        {
           if(!graph[v[i]][v[i+1]]){
               flag=false;
               break;
           }
            
        }
        if(flag) cnt++;


    }while(next_permutation(ALL(v)));
    cout<<cnt<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:11: error: request for member 'assign' in 'graph', which is of non-class type 'bool [10][10]'
   30 |     graph.assign(n,vector<int>());
      |           ^~~~~~
Language: C++

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

#define rep for(int i = 0;i<n;i++)
const int MOD = 1000000007;

int n,m, ans;
bool graph[n][n],frag[n];

void dfs(bool a,int b,int c){
        if(b == n){
                ans += 1;  return;
        }
        for(int i = 0;i<n;i++){
                if(a[i] == false and graph[c][i] == true){
                    a[i] = true;  dfs(a,b+1, i);
                }
        }
}

int main(){
     cin >> n >> m;
     for(int i = 0;i<m;i++){
             int ai,bi;cin >> ai >> bi;
             graph[ai-1][bi-1] = true;graph[bi-1][ai-1] = true;
     }
     ans = 0;
     frag[0] = true;
     dfs(frag, 1, 0);

     cout << ans << endl;
}

Compiler output:
a.cc:8:15: error: size of array 'graph' is not an integral constant-expression
    8 | bool graph[n][n],frag[n];
      |               ^
a.cc:8:12: error: size of array 'graph' is not an integral constant-expression
    8 | bool graph[n][n],frag[n];
      |            ^
a.cc:8:23: error: size of array 'frag' is not an integral constant-expression
    8 | bool graph[n][n],frag[n];
      |                       ^
a.cc: In function 'void dfs(bool, int, int)':
a.cc:15:21: error: invalid types 'bool[int]' for array subscript
   15 |                 if(a[i] == false and graph[c][i] == true){
      |                     ^
a.cc:16:22: error: invalid types 'bool[int]' for array subscript
   16 |                     a[i] = true;  dfs(a,b+1, i);
      |                      ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;

const int MAX = 8;
bool G[MAX][MAX];

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

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

    if(all_visited) {
        return 1;
    }

    int ret = 0;

    rep(i, n) {
        if(!G[v][i]) {
            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;

    rep(i, m) {
        int a, b;
        cin >> a >> b;
        a--;  b--;
        G[a][b] = G[b][a] = true;
    }

    bool visited[MAX];
    rep(i, n) {
        visited[i] = false;
    }
    visited[0] = true;
    
    cout << dfs(0, n, visited);
    
    cout << endl;
    return 0;
}

Compiler output:
a.cc:14:39: error: cannot resolve overloaded function 'max' based on conversion to type 'long unsigned int'
   14 | int dfs(int v, int n, bool visited[max]) {
      |                                       ^
a.cc:14:28: error: size of array 'visited' has non-integral type '<unresolved overloaded function type>'
   14 | int dfs(int v, int n, bool visited[max]) {
      |                            ^~~~~~~
Language: C++

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

vector<int> d[10];

struct mode{
	int n;
	bool has[10];
};

mode dfs[100000];

int main()
{
	int n,m,i,j,a,b,top,tmp,count,ans;
	bool hast[10];
	cin>>n>>m;
	for(i=0;i<m;i++) 
	{
		cin>>a>>b
		if(b!=1) d[a].push_back(b);
		if(a!=1) d[b].push_back(a);
	}
	top=0,dfs[0].n=1,dfs[0].has[1]=1,ans=0;
	while(top>=0)
	{
		tmp = dfs[top].n,count=0;
		for(i=1;i<=n;i++) hast[i]=dfs[top].has[i],count+=hast[i];
		top--;
		if(count==n)
		{
			ans++;
			continue;
		}
		for(i=0;i<d[tmp].size();i++)
		{
			if(!(hast[d[tmp][i]]))
			{
				dfs[++top].n=d[tmp][i];
				for(j=1;j<=n;j++) dfs[top].has[j]=hast[j];
				dfs[top].has[d[tmp][i]] = 1;
			}
		}
	}
	cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: expected ';' before 'if'
   20 |                 cin>>a>>b
      |                          ^
      |                          ;
   21 |                 if(b!=1) d[a].push_back(b);
      |                 ~~
Language: C++

#include <bits/stdc++.h>

#define infi            2e9
#define infl            5e18
#define MX              100005
#define pi              2*acos(0.0)
#define ll              long long
#define rr              read()
#define ff              first
#define ss              second
#define pb              push_back
#define pii             pair<int,int>
#define pll             pair<ll,ll>
#define ms(a,b)         memset(a, b, sizeof(a))
#define loop(i,n)       for(register int i=0;i<n;i++)
#define loop1(i,n)      for(register int i=1;i<=n;i++)

using namespace std;

inline ll read(){char c=getchar();ll num,sign=1;for(;c<'0'||c>'9';c=getchar())if(c=='-')sign=-1;for(num=0;c>='0'&&c<='9';){c-='0';num=num*10+c;c=getchar();}return num*sign;}
// inline ll pw(ll b, ll p){ll ans=1;while(p>0){if(p&1)ans*=b;p>>=1;b*=b;}return ans;}
// inline bool isPrime(ll n){if(n==1)return false;if(n==2)return true;if(!(n%2))return false;for(ll i=3;i<=sqrt(n);i+=2)if(!(n%i))return false;return true;}
// inline ll gcd(ll a, ll b){if(a==0)return b;return gcd(b%a,a);}

// //*************************************  Bitmask Opereations  **********************************//
// int Set(int N,int pos){return N=N | (1<<pos);}
// int reset(int N,int pos){return N= N & ~(1<<pos);}
// bool check(int N,int pos){return (bool)(N & (1<<pos));}
// //********************************************************************************************//

int cnt=0,n;
bool vis[10]={0};
vector<int>adj[10];

void DFS(int u, int p, int nod){
    if(nod==n)cnt++;
    vis[v]=1;
    for(auto v:adj[u]){
        if(v!=p && !vis[v]){
            DFS(v,u,nod+1);
        }
    }
    vis[u]=0;
}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);
    //#ifdef rid.dle//freopen("in.txt", "r", stdin);//#endif
    //freopen("in.txt", "r", stdin);

    n=rr;
    int m=rr,x,y;
    loop(i,m){
        x=rr;y=rr;
        adj[x].pb(y);
        adj[y].pb(x);
    }

    if(m<n-1){
        cout << 0 << endl;
        return 0;
    }

    DFS(1,0,1);

    cout << cnt << endl;

    return 0;
}


Compiler output:
a.cc: In function 'void DFS(int, int, int)':
a.cc:37:9: error: 'v' was not declared in this scope
   37 |     vis[v]=1;
      |         ^
a.cc: In function 'int main()':
a.cc:53:10: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   53 |     loop(i,m){
      |          ^
a.cc:15:42: note: in definition of macro 'loop'
   15 | #define loop(i,n)       for(register int i=0;i<n;i++)
      |                                          ^
Language: C

#define _CRT_SECURE_NO_WARNINGS

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

/* define */
#define Yes(X) puts ( X ? "Yes" : "No")
#define YES(X) puts ( X ? "YES" : "NO")
#define FOR(i, a, b) for ( i = a; i < b ; i++)
#define REP(i, n) for ( i = 0; i < n ; i++)
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max3(a, b, c) ((max((a), (b)) > (c)) ? max((a), (b)) : (c))
#define min3(a, b, c) ((min((a), (b)) < (c)) ? min((a), (b)) : (c))

/* const */
const int MOD = (int)1e9 + 7;

/* alias */
typedef long long ll;

/* function */
int cmp(const void *a, const void *b) {
	return *(int*)a - *(int*)b;
}
int cmp2(const void *a, const void *b) {
	return *(int*)b - *(int*)a;
}

/* main */
int i, j, k;

int n, m, a, b, x = 0, ver[8][8] = { 0 }, visited[nmax] = { 1 };


int visit(int x, int visited[nmax]) {
	int all_visited = 1;
	REP(i, n) if (visited[i] == 0) all_visited = 0;
	if (all_visited) {
		printf("\n");
		return 1;
	}
	int c = 0;
	REP(i, n) {
		if (visited[i] == 0 && ver[x][i] == 1) {
			visited[i] = 1;
			printf("%d", x);
			c += visit(i, visited);
			visited[i] = 0;
		}
	}
	return c;
}

int main() {
	scanf("%d%d", &n, &m);
	REP(i, m) {
		scanf("%d%d", &a, &b);
		ver[a - 1][b - 1] = 1;
		ver[b - 1][a - 1] = 1;
	}
	printf("%d\n", visit(x, visited));
	return 0;
}

Compiler output:
main.c:35:51: error: 'nmax' undeclared here (not in a function); did you mean 'fmax'?
   35 | int n, m, a, b, x = 0, ver[8][8] = { 0 }, visited[nmax] = { 1 };
      |                                                   ^~~~
      |                                                   fmax
main.c: In function 'visit':
main.c:50:39: error: type of formal parameter 2 is incomplete
   50 |                         c += visit(i, visited);
      |                                       ^~~~~~~
main.c: In function 'main':
main.c:64:33: error: type of formal parameter 2 is incomplete
   64 |         printf("%d\n", visit(x, visited));
      |                                 ^~~~~~~
Language: C

#define _CRT_SECURE_NO_WARNINGS

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

/* define */
#define Yes(X) puts ( X ? "Yes" : "No")
#define YES(X) puts ( X ? "YES" : "NO")
#define FOR(i, a, b) for ( i = a; i < b ; i++)
#define REP(i, n) for ( i = 0; i < n ; i++)
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max3(a, b, c) ((max((a), (b)) > (c)) ? max((a), (b)) : (c))
#define min3(a, b, c) ((min((a), (b)) < (c)) ? min((a), (b)) : (c))

/* const */
const int MOD = (int)1e9 + 7;

/* alias */
typedef long long ll;

/* function */
int cmp(const void *a, const void *b) {
	return *(int*)a - *(int*)b;
}
int cmp2(const void *a, const void *b) {
	return *(int*)b - *(int*)a;
}

/* main */
int i, j, k;

const int nmax = 8;
int n, m, a, b, x = 0, ver[nmax][nmax] = { 0 }, visited[nmax] = { 1 };


int visit(int x, int visited[nmax]) {
	int all_visited = 1;
	REP(i, n) if (visited[i] == 0) all_visited = 0;
	if (all_visited) {
		printf("\n");
		return 1;
	}
	int c = 0;
	REP(i, n) {
		if (visited[i] == 0 && ver[x][i] == 1) {
			visited[i] = 1;
			printf("%d", x);
			c += visit(i, visited);
			visited[i] = 0;
		}
	}
	return c;
}

int main() {
	scanf("%d%d", &n, &m);
	REP(i, m) {
		scanf("%d%d", &a, &b);
		ver[a - 1][b - 1] = 1;
		ver[b - 1][a - 1] = 1;
	}
	printf("%d\n", visit(x, visited));
	return 0;
}

Compiler output:
main.c:36:24: error: variably modified 'ver' at file scope
   36 | int n, m, a, b, x = 0, ver[nmax][nmax] = { 0 }, visited[nmax] = { 1 };
      |                        ^~~
main.c:36:24: error: variably modified 'ver' at file scope
main.c:36:49: error: variably modified 'visited' at file scope
   36 | int n, m, a, b, x = 0, ver[nmax][nmax] = { 0 }, visited[nmax] = { 1 };
      |                                                 ^~~~~~~
Language: C

#define _CRT_SECURE_NO_WARNINGS

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

/* define */
#define Yes(X) puts ( X ? "Yes" : "No")
#define YES(X) puts ( X ? "YES" : "NO")
#define FOR(i, a, b) for ( i = a; i < b ; i++)
#define REP(i, n) for ( i = 0; i < n ; i++)
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max3(a, b, c) ((max((a), (b)) > (c)) ? max((a), (b)) : (c))
#define min3(a, b, c) ((min((a), (b)) < (c)) ? min((a), (b)) : (c))

/* const */
const int MOD = (int)1e9 + 7;

/* alias */
typedef long long ll;

/* function */
int cmp(const void *a, const void *b) {
	return *(int*)a - *(int*)b;
}
int cmp2(const void *a, const void *b) {
	return *(int*)b - *(int*)a;
}

/* main */
int i, j, k;

const int nmax = 8;
int n, m, a, b, x = 0, ver[nmax][nmax] = { false }, visited[nmax] = { true };


int visit(int x, int visited[nmax]) {
	int all_visited = true;
	REP(i, n) if (visited[i] == false) all_visited = false;
	if (all_visited) {
		printf("\n");
		return 1;
	}
	int c = 0;
	REP(i, n) {
		if (visited[i] == false && ver[x][i] == true) {
			visited[i] = true;
			printf("%d", x);
			c += visit(i, visited);
			visited[i] = false;
		}
	}
	return c;
}

int main() {
	scanf("%d%d", &n, &m);
	REP(i, m) {
		scanf("%d%d", &a, &b);
		ver[a - 1][b - 1] = true;
		ver[b - 1][a - 1] = true;
	}
	printf("%d\n", visit(x, visited));
	return 0;
}

Compiler output:
main.c:36:24: error: variably modified 'ver' at file scope
   36 | int n, m, a, b, x = 0, ver[nmax][nmax] = { false }, visited[nmax] = { true };
      |                        ^~~
main.c:36:24: error: variably modified 'ver' at file scope
main.c:36:44: error: 'false' undeclared here (not in a function)
   36 | int n, m, a, b, x = 0, ver[nmax][nmax] = { false }, visited[nmax] = { true };
      |                                            ^~~~~
main.c:7:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    6 | #include <math.h>
  +++ |+#include <stdbool.h>
    7 | 
main.c:36:53: error: variably modified 'visited' at file scope
   36 | int n, m, a, b, x = 0, ver[nmax][nmax] = { false }, visited[nmax] = { true };
      |                                                     ^~~~~~~
main.c:36:71: error: 'true' undeclared here (not in a function)
   36 | int n, m, a, b, x = 0, ver[nmax][nmax] = { false }, visited[nmax] = { true };
      |                                                                       ^~~~
main.c:36:71: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
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(void){
 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 main()':
a.cc:49:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   49 |  cin >> N >> M;
      |  ^~~
      |  std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:63:2: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   63 |  cout << dfs(0,N,visited) << endl;
      |  ^~~~
      |  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:63:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   63 |  cout << dfs(0,N,visited) << endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
//typedef pair<long long,long long> P;
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd(b,a%b);
  }
}
 
long long lcm(long long x, long long y){
  return (x/gcd(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};
  
vector<int> G[9];
bool used[9];

int dfs(int v,vector<bool> used){
  int n=used.size();
  bool flag = true;
  REP(i,n){
    if(!used[i]){
      flag = false;
    }
  }
  if(flag){
    return 1;
  }
  
  int res=0;
  for(int i=0;i<G[v].size();i++){
    if(used[G[v][i]]){
      continue;
    }else{
      used[G[v][i]]=true;
      res += dfs(G[v][i],used);
      used[G[v][i]]=false;
    }
  }
  return res;
}
  
int main(){
  int n,m;
  cin>>n>>m;
  int a,b;
  REP(i,m){
    cin>>a>>b;
    a--;b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  int ans;
  used[0]=true;
  ans = dfs(0,used);
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:130:15: error: could not convert '(bool*)(& used)' from 'bool*' to 'std::vector<bool>'
  130 |   ans = dfs(0,used);
      |               ^~~~
      |               |
      |               bool*
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() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    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];
    visited[0] = true;
    cout << dfs(0, N, visited) << endl;
}

Compiler output:
a.cc: In function 'int dfs(int, int, bool*)':
a.cc:21:33: error: expected ';' before ':' token
   21 |         if (visited[i]) continue:
      |                                 ^
      |                                 ;
a.cc:21:33: error: expected primary-expression before ':' token
a.cc: In function 'int main()':
a.cc:38:31: error: 'b' was not declared in this scope
   38 |         int A, B; cin >> A >> b;
      |                               ^
Language: C++

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

const N_max = 8; 
bool node[N_max][N_max];

int DFS(int v, int N){
    bool all_visit = true;
    for(int i=0; i<N; i++){
        if(visit.at(i) == false) all_visit = false;
    }
    if(all_visit)return 1;

    int ans = 0;

    for(int i=0; i<N; i++){
        if(visit.at(i)) continue;
        if(node[v][i] == false) continue;

        visit[i] = true;
        ans += DFS(i,N,visit);
        visit[i] = false; 
    }
    return ans;
}

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

    for(int i=0; i<N; i++){
        int a, b;
        cin >> a >> b;
        node[a][b] = node[b][a] = true;
    }
    
    vector <bool>visit(N,false);
    visit.at(0)=true;



    return 0;
}

Compiler output:
a.cc:6:7: error: 'N_max' does not name a type
    6 | const N_max = 8;
      |       ^~~~~
a.cc:7:11: error: 'N_max' was not declared in this scope
    7 | bool node[N_max][N_max];
      |           ^~~~~
a.cc:7:18: error: 'N_max' was not declared in this scope
    7 | bool node[N_max][N_max];
      |                  ^~~~~
a.cc: In function 'int DFS(int, int)':
a.cc:12:12: error: 'visit' was not declared in this scope
   12 |         if(visit.at(i) == false) all_visit = false;
      |            ^~~~~
a.cc:4:1: note: 'std::visit' is defined in header '<variant>'; this is probably fixable by adding '#include <variant>'
    3 | #include <vector>
  +++ |+#include <variant>
    4 | using namespace std;
a.cc:19:12: error: 'visit' was not declared in this scope
   19 |         if(visit.at(i)) continue;
      |            ^~~~~
a.cc:19:12: note: 'std::visit' is defined in header '<variant>'; this is probably fixable by adding '#include <variant>'
a.cc:20:12: error: 'node' was not declared in this scope
   20 |         if(node[v][i] == false) continue;
      |            ^~~~
a.cc:22:9: error: 'visit' was not declared in this scope
   22 |         visit[i] = true;
      |         ^~~~~
a.cc:22:9: note: 'std::visit' is defined in header '<variant>'; this is probably fixable by adding '#include <variant>'
a.cc: In function 'int main()':
a.cc:36:9: error: 'node' was not declared in this scope
   36 |         node[a][b] = node[b][a] = true;
      |         ^~~~
Language: C++

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

int main() {
    int N, M;
    cin >> N >> M;
    vector<vector<int>> G(N, vector<int>(N));
    for (int i = 0; i < M; i++) {
        int a, b;
        cin >> a >> b;
        a--; b--;
        G[a][b] = G[b][a] = 1;
    }
    vector<int> v(N);
    for (int i = 0; i < N; i++)
        v[i] = i;

    int res = 0;
    do {
        if (v[0] != 0) break;
        bool flag = true;
        for (int i = 0; i < N - 1; i++) {
            if (G[v[i]][v[i + 1]] == 0) {
                flag = false;
                break;
            }
        }
        if (flag) res++;
    } while (next_permutation(v.begin(), v.end()));

    cout << res << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:14: error: 'next_permutation' was not declared in this scope
   30 |     } while (next_permutation(v.begin(), v.end()));
      |              ^~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int ms = 10;
int visit[ms];
vector<int> g[ms];
int n,m;

int solve(int node, int p){
	visit[node] = 1;
	bool f = 0;
  for(int i = 1;i<=n;i++){
  	if(!visit[i])
      	f = 1;
  }
  if(!f)
    	return 1;
 	int ans = 0;
  for(auto it : g[node]){
  		if(it==p)
          	continue;
   		if(!visit[it]){
        	dfs(it,node);
          visit[it] = 0;
        }
  
  }
  return ans;
  

}

int main(){
	int a,b;
	cin >> n >> m;
  for(int i = 0;i<m;i++){
  	cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  cout<<dfs(1,-1);

}

Compiler output:
a.cc: In function 'int solve(int, int)':
a.cc:9:9: error: reference to 'visit' is ambiguous
    9 |         visit[node] = 1;
      |         ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
                 from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:4:5: note:                 'int visit [10]'
    4 | int visit[ms];
      |     ^~~~~
a.cc:12:13: error: reference to 'visit' is ambiguous
   12 |         if(!visit[i])
      |             ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:4:5: note:                 'int visit [10]'
    4 | int visit[ms];
      |     ^~~~~
a.cc:21:21: error: reference to 'visit' is ambiguous
   21 |                 if(!visit[it]){
      |                     ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:4:5: note:                 'int visit [10]'
    4 | int visit[ms];
      |     ^~~~~
a.cc:22:17: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   22 |                 dfs(it,node);
      |                 ^~~
      |                 ffs
a.cc:23:11: error: reference to 'visit' is ambiguous
   23 |           visit[it] = 0;
      |           ^~~~~
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:4:5: note:                 'int visit [10]'
    4 | int visit[ms];
      |     ^~~~~
a.cc: In function 'int main()':
a.cc:40:9: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   40 |   cout<<dfs(1,-1);
      |         ^~~
      |         ffs
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<stack>
using namespace std;
int n,m;
//接続状況を確認する配列
int connect[n][n];
//既にその頂点を使っているか管理する配列
int visited[n];
int dfs(int now,int depth){
    if(visited[now])return 0;
    if(depth==n)return 1;
    //使用済みフラグを立てる
    visited[now]=1;
    int ans=0;
    //全部の遷移先を調べる
    for(int i=0;i<n;i++){
        if(connect[now][i]){
            ans+=dfs(i,depth+1);
        }
    }
    //使用済みフラグをおる
    visited[now]=0;
    return ans;
}
int main(){
    //int n,m;
    cin >>n>>m;
    int a[m];
    int b[m];
    for(int i=0;i<m;i++){
        cin >>a[i]>>b[i];
        a[i]--;b[i]--;
    }
    visited[n]={}
    connect[n][n]={}
    for(int i=0;i<m;i++){
        connect[a[i]][b[i]]=connect[b[i]][a[i]]=1;

    }
    cout <<dfs(0,1)<<endl;
}


Compiler output:
a.cc:8:16: error: size of array 'connect' is not an integral constant-expression
    8 | int connect[n][n];
      |                ^
a.cc:8:13: error: size of array 'connect' is not an integral constant-expression
    8 | int connect[n][n];
      |             ^
a.cc:10:13: error: size of array 'visited' is not an integral constant-expression
   10 | int visited[n];
      |             ^
a.cc: In function 'int main()':
a.cc:36:18: error: expected ';' before 'connect'
   36 |     visited[n]={}
      |                  ^
      |                  ;
   37 |     connect[n][n]={}
      |     ~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<stack>
using namespace std;
int n,m;
//接続状況を確認する配列
int connect[n][n];
//既にその頂点を使っているか管理する配列
int visited[n];
int n,m;

int dfs(int now,int depth){
    if(visited[now])return 0;
    if(depth==n)return 1;
    //使用済みフラグを立てる
    visited[now]=1;
    int ans=0;
    //全部の遷移先を調べる
    for(int i=0;i<n;i++){
        if(connect[now][i]){
            ans+=dfs(i,depth+1);
        }
    }
    //使用済みフラグをおる
    visited[now]=0;
    return ans;
}
int main(){
    //int n,m;
    cin >>n>>m;
    int a[m];
    int b[m];
    for(int i=0;i<m;i++){
        cin >>a[i]>>b[i];
        a[i]--;b[i]--;
    }
    visited[n]={}
    connect[n][n]={}
    for(int i=0;i<m;i++){
        connect[a[i]][b[i]]=connect[b[i]][a[i]]=1;

    }
    cout <<dfs(0,1)<<endl;
}


Compiler output:
a.cc:8:16: error: size of array 'connect' is not an integral constant-expression
    8 | int connect[n][n];
      |                ^
a.cc:8:13: error: size of array 'connect' is not an integral constant-expression
    8 | int connect[n][n];
      |             ^
a.cc:10:13: error: size of array 'visited' is not an integral constant-expression
   10 | int visited[n];
      |             ^
a.cc:11:5: error: redefinition of 'int n'
   11 | int n,m;
      |     ^
a.cc:6:5: note: 'int n' previously declared here
    6 | int n,m;
      |     ^
a.cc:11:7: error: redefinition of 'int m'
   11 | int n,m;
      |       ^
a.cc:6:7: note: 'int m' previously declared here
    6 | int n,m;
      |       ^
a.cc: In function 'int main()':
a.cc:38:18: error: expected ';' before 'connect'
   38 |     visited[n]={}
      |                  ^
      |                  ;
   39 |     connect[n][n]={}
      |     ~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<stack>
using namespace std;
//接続状況を確認する配列
int connect[n][n];
//既にその頂点を使っているか管理する配列
int visited[n];
int n,m;

int dfs(int now,int depth){
    if(visited[now])return 0;
    if(depth==n)return 1;
    //使用済みフラグを立てる
    visited[now]=1;
    int ans=0;
    //全部の遷移先を調べる
    for(int i=0;i<n;i++){
        if(connect[now][i]){
            ans+=dfs(i,depth+1);
        }
    }
    //使用済みフラグをおる
    visited[now]=0;
    return ans;
}
int main(){
    int n,m;
    cin >>n>>m;
    int a[m];
    int b[m];
    for(int i=0;i<m;i++){
        cin >>a[i]>>b[i];
        a[i]--;b[i]--;
    }
    visited[n]={}
    connect[n][n]={}
    for(int i=0;i<m;i++){
        connect[a[i]][b[i]]=connect[b[i]][a[i]]=1;

    }
    cout <<dfs(0,1)<<endl;
}


Compiler output:
a.cc:7:13: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 | int connect[n][n];
      |             ^
      |             yn
a.cc:7:16: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 | int connect[n][n];
      |                ^
      |                yn
a.cc:9:13: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 | int visited[n];
      |             ^
      |             yn
a.cc: In function 'int dfs(int, int)':
a.cc:13:8: error: 'visited' was not declared in this scope
   13 |     if(visited[now])return 0;
      |        ^~~~~~~
a.cc:16:5: error: 'visited' was not declared in this scope
   16 |     visited[now]=1;
      |     ^~~~~~~
a.cc:20:12: error: 'connect' was not declared in this scope; did you mean 'const'?
   20 |         if(connect[now][i]){
      |            ^~~~~~~
      |            const
a.cc: In function 'int main()':
a.cc:37:5: error: 'visited' was not declared in this scope
   37 |     visited[n]={}
      |     ^~~~~~~
a.cc:40:9: error: 'connect' was not declared in this scope; did you mean 'const'?
   40 |         connect[a[i]][b[i]]=connect[b[i]][a[i]]=1;
      |         ^~~~~~~
      |         const
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<stack>
using namespace std;
//接続状況を確認する配列
int connect[n][n];
//既にその頂点を使っているか管理する配列
int visited[n];
int n,m;

int dfs(nit now,int depth){
    if(visited[now])return 0;
    if(depth==n)return 1;
    //使用済みフラグを立てる
    visited[now]=1;
    int ans=0;
    //全部の遷移先を調べる
    for(int i=0;i<n;i++){
        if(connect[now][i]){
            ans+=dfs(i,depth+1);
        }
    }
    //使用済みフラグをおる
    visited[now]=0;
    return ans;
}
int main(){
    cin >>n>>m;
    int a[m];
    int b[m];
    for(int i=0;i<m;i++){
        cin >>a[i]>>b[i];
        a[i]--;b[i]--;
    }
    visited[n]={}
    connect[n][n]={}
    for(int i=0;i<m;i++){
        connect[a[i]][b[i]]=connect[b[i]][a[i]]=1;

    }
    cout <<dfs(0,1)<<endl;
}


Compiler output:
a.cc:7:13: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 | int connect[n][n];
      |             ^
      |             yn
a.cc:7:16: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 | int connect[n][n];
      |                ^
      |                yn
a.cc:9:13: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 | int visited[n];
      |             ^
      |             yn
a.cc:12:9: error: 'nit' was not declared in this scope; did you mean 'int'?
   12 | int dfs(nit now,int depth){
      |         ^~~
      |         int
a.cc:12:17: error: expected primary-expression before 'int'
   12 | int dfs(nit now,int depth){
      |                 ^~~
a.cc:12:26: error: expression list treated as compound expression in initializer [-fpermissive]
   12 | int dfs(nit now,int depth){
      |                          ^
a.cc: In function 'int main()':
a.cc:36:5: error: 'visited' was not declared in this scope
   36 |     visited[n]={}
      |     ^~~~~~~
a.cc:39:9: error: 'connect' was not declared in this scope; did you mean 'const'?
   39 |         connect[a[i]][b[i]]=connect[b[i]][a[i]]=1;
      |         ^~~~~~~
      |         const
a.cc:42:15: error: 'dfs' cannot be used as a function
   42 |     cout <<dfs(0,1)<<endl;
      |            ~~~^~~~~
Language: C++

#include<bits/stdc++.h>
#include<vector>
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 (void){
    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:10:30: error: expected ';' before '}' token
   10 |             all_visited=false
      |                              ^
      |                              ;
   11 |         }
      |         ~                     
a.cc:25:16: error: a function-definition is not allowed here before '{' token
   25 | int main (void){
      |                ^
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:6:40: note: to match this '{'
    6 | int dfs(int v,int N,bool visited[nmax]){
      |                                        ^
a.cc:42:2: warning: control reaches end of non-void function [-Wreturn-type]
   42 | }
      |  ^
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
//vector<int> used;
//vector<int> connect;
int N,M;
int dfs(int now,int depth){
   if(used[now])return 0;
   if(depth==N)return 1;
   used[now]=1;
   int ans=0;
   for(int i=0;i<N;i++){
      if(connect[now][i])ans+=dfs(i,depth+1);
   }  
   used[now]=0;
   return ans;
} 
int main() {
   cin >>N>>M;
   //vector a(M),b(M);
   int a[M];
   int b[M];
   for(int i=0;i<M;i++){
      cin>>a[i]>>b[i];
      a[i]--;b[i]--;
   }
   //used=vector(N,0);
   int used[N]={};//N個の配列に０を代入する
   //connect=vector(N,vector(N,0));
   int connect[N][N]={};
   for(int i=0;i<M;i++){
      connect[a[i]][b[i]]=connect[b[i]][a[i]]=1;

   }
   cout<<dfs(0,1)<<endl;
}


Compiler output:
a.cc: In function 'int dfs(int, int)':
a.cc:10:7: error: 'used' was not declared in this scope
   10 |    if(used[now])return 0;
      |       ^~~~
a.cc:12:4: error: 'used' was not declared in this scope
   12 |    used[now]=1;
      |    ^~~~
a.cc:15:10: error: 'connect' was not declared in this scope; did you mean 'const'?
   15 |       if(connect[now][i])ans+=dfs(i,depth+1);
      |          ^~~~~~~
      |          const
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int used[10000];
int connect[10000][10000];
//vector<int> used;
//vector<int> connect;
int N,M;
int dfs(int now,int depth){
   if(used[now])return 0;
   if(depth==N)return 1;
   used[now]=1;
   int ans=0;
   for(int i=0;i<N;i++){
      if(connect[now][i])ans+=dfs(i,depth+1);
   }  
   used[now]=0;
   return ans;
} 
int main() {
   cin >>N>>M;
   //vector a(M),b(M);
   int a[M];
   int b[M];
   for(int i=0;i<M;i++){
      cin>>a[i]>>b[i];
      a[i]--;b[i]--;
   }
   //used=vector(N,0);
   int used[N]={}//N個の配列に０を代入する
   //connect=vector(N,vector(N,0));
   int connect[N][N]={};
   for(int i=0;i<M;i++){
      connect[a[i]][b[i]]=connect[b[i]][a[i]]=1;

   }
   cout<<dfs(0,1)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:4: error: expected ',' or ';' before 'int'
   34 |    int connect[N][N]={};
      |    ^~~
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int used[10000];
int connect[10000][10000];
//vector<int> used;
//vector<int> connect;
int N,M;
int dfs(int now,int depth){
   if(used[now])return 0;
   if(depth==N)return 1;
   used[now]=1;
   int ans=0;
   for(int i=0;i<N;i++){
      if(connect[now][i])ans+=dfs(i,depth+1);
   }  
   used[now]=0;
   return ans;
} 
int main() {
   cin >>N>>M;
   //vector a(M),b(M);
   int a[M];
   int b[M];
   for(int i=0;i<M;i++){
      cin>>a[i]>>b[i];
      a[i]--;b[i]--;
   }
   //used=vector(N,0);
   int used[N]={}//N個の配列に０を代入する
   //connect=vector(N,vector(N,0));
   int connect[N][N]={}
   for(int i=0,i<M;i++){
      connect[a[i]b[i]]=connect[b[i]a[i]]=1;

   }
   cout<<dfs(0,1)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:4: error: expected ',' or ';' before 'int'
   34 |    int connect[N][N]={}
      |    ^~~
a.cc:35:17: error: expected ';' before '<' token
   35 |    for(int i=0,i<M;i++){
      |                 ^
      |                 ;
a.cc:35:17: error: expected primary-expression before '<' token
a.cc:36:19: error: expected ']' before 'b'
   36 |       connect[a[i]b[i]]=connect[b[i]a[i]]=1;
      |                   ^
      |                   ]
a.cc:36:19: error: expected ';' before 'b'
   36 |       connect[a[i]b[i]]=connect[b[i]a[i]]=1;
      |                   ^
      |                   ;
Language: C++

#include <bits/stdc++.h>
#include<algorithm>
#include<string>
#include<vector>
using namespace std;
int used[10000];
int connect[10000][10000];
//vector<int> used;
//vector<int> connect;
int N,M;
int dfs(int now,int depth){
   if(used[now])return 0;
   if(depth==N)return 1;
   used[now]=1;
   int ans=0;
   for(int i=0;i<N;i++){
      if(connect[now][i])ans+=dfs(i,depth+1);
   }  
   used[now]=0;
   return ans;
} 
int main() {
   cin >>N>>M;
   //vector a(M),b(M);
   int a[M];
   int b[M];
   for(int i=0,i<M;i++){
      cin>>a[i]>>b[i];
      a[i]--;b[i]--;
   }
   used=vector(N,0);
   connect=vector(N,vector(N,0));
   for(int i=0,i<M;i++){
      connect[a[i]b[i]]=connect[b[i]a[i]]=1;

   }
   cout<<dfs(0,1)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: expected ';' before '<' token
   27 |    for(int i=0,i<M;i++){
      |                 ^
      |                 ;
a.cc:27:17: error: expected primary-expression before '<' token
a.cc:31:8: error: incompatible types in assignment of 'std::vector<int>' to 'int [10000]'
   31 |    used=vector(N,0);
      |    ~~~~^~~~~~~~~~~~
a.cc:32:11: error: incompatible types in assignment of 'std::vector<std::vector<int>, std::allocator<std::vector<int> > >' to 'int [10000][10000]'
   32 |    connect=vector(N,vector(N,0));
      |    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
a.cc:33:17: error: expected ';' before '<' token
   33 |    for(int i=0,i<M;i++){
      |                 ^
      |                 ;
a.cc:33:17: error: expected primary-expression before '<' token
a.cc:34:19: error: expected ']' before 'b'
   34 |       connect[a[i]b[i]]=connect[b[i]a[i]]=1;
      |                   ^
      |                   ]
a.cc:34:19: error: expected ';' before 'b'
   34 |       connect[a[i]b[i]]=connect[b[i]a[i]]=1;
      |                   ^
      |                   ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int dfs(vector<vector<int>>&a,vector<int>b,int i,int n){
  int counter=0;
  for(int k;k<n+1;k++){
    counter+=b.at(k);
  }
  if(b.at(i)==0){
    b.at(i)=1;
    int sum=0;
    for(int j=0;j<a.at(i).size();j++){
      sum+=dfs(a,b,a.at(i).at(j));
    }
    return sum;
  }
  else if(b.at(i)==1&&counter==n){
    return 1;
  }
  else return 0;
}
int main(){
  int n,m;
  cin>>n>>m;
  vector<int> a(m);
  vector<int> b(m);
  for(int i=0;i<m;i++){
    cin>>a.at(i)>>b.at(i);
  }
  vector<vector<int>> c(n+1);
  for(int i=0;i<m;i++){
    c.at(a.at(i)).push_back(b.at(i));
    c.at(b.at(i)).push_back(a.at(i));
  }
  vector<int> f(n+1);
  cout<<dfs(c,f,1,n)<<endl;
}

Compiler output:
a.cc: In function 'int dfs(std::vector<std::vector<int> >&, std::vector<int>, int, int)':
a.cc:12:15: error: too few arguments to function 'int dfs(std::vector<std::vector<int> >&, std::vector<int>, int, int)'
   12 |       sum+=dfs(a,b,a.at(i).at(j));
      |            ~~~^~~~~~~~~~~~~~~~~~~
a.cc:3:5: note: declared here
    3 | int dfs(vector<vector<int>>&a,vector<int>b,int i,int n){
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int dfs(vector<vector<int>>&a,vector<int>b,int i,int n){
  if(b.at(i)==0){
    b.at(i)=1;
    int sum=0;
    for(int j=0;j<a.at(i).size();j++){
      sum+=dfs(a,f,a.at(i).at(j));
    }
    return sum;
  }
  int counter=0;
  for(int k;k<n+1;k++){
    counter+=b.at(k);
  }
  else if(b.at(i)==1&&counter==n){
    return 1;
  }
  else return 0;
}
int main(){
  int n,m;
  cin>>n>>m;
  vector<int> a(m);
  vector<int> b(m);
  for(int i=0;i<m;i++){
    cin>>a.at(i)>>b.at(i);
  }
  vector<vector<int>> c(n+1);
  for(int i=0;i<m;i++){
    c.at(a.at(i)).push_back(b.at(i));
    c.at(b.at(i)).push_back(a.at(i));
  }
  vector<int> f(n+1);
  cout<<dfs(c,f,1,n)<<endl;
}

Compiler output:
a.cc: In function 'int dfs(std::vector<std::vector<int> >&, std::vector<int>, int, int)':
a.cc:8:18: error: 'f' was not declared in this scope
    8 |       sum+=dfs(a,f,a.at(i).at(j));
      |                  ^
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else if(b.at(i)==1&&counter==n){
      |   ^~~~
Language: C++

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

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 (a>b) { a=b; return 1; } return 0; }
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)

int main(){
    int n,m;
    cin>>n>>m;
    int edge[n][n];
    memset(edge,0,sizeof(edge));
    rep(i,m){
        int a,b;
        cin>>a>>b;
        edge[a-1][b-1]=1;
        edge[b-1][a-1]=1;
    }
    vector<int> a(n);
    rep(i,n)a[i]=i;
    int ans=0;
    int combi=1;
    rep(i,1,n+1)combi*=i;
    rep(i,combi){
        bool flag=1;
        rep(j,n-1){
            if(!edge[a[j]][a[j+1]]){
                flag=0;
                break;
            }
        }
        if(flag)++ans;
        next_permutation(a.first(),a.last());
    }
    cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:28: error: 'class std::vector<int>' has no member named 'first'
   37 |         next_permutation(a.first(),a.last());
      |                            ^~~~~
a.cc:37:38: error: 'class std::vector<int>' has no member named 'last'; did you mean 'at'?
   37 |         next_permutation(a.first(),a.last());
      |                                      ^~~~
      |                                      at
Language: C++

#include <iostream>
#include <vector>

using namespace std;

vector<vector<int> > edges;

bool isValid(vector<int> v){
    if(v[0] != 1)
        return false;
    for(int i = 0; i< v.size()-1; i++){
        if(!edges[v[i]][v[i+1]]){
            return false;
        }
    }
    return true;
}

int main() {
    int n,m; cin >> n >> m;
    vector<int> edge(n);
    vector<int> v;
    for(int i = 0;i<n;i++){
        v.push_back(i);
        edges.push_back(edge);
        for(int j = 0; j< n;j++){
            edges[i][j] = 0;
        }
    }
    int from,to;
    for(int i = 0; i< m;i++){
        cin >> from >> to;
        edges[from-1][to-1] = 1;
        edges[to-1][from-1] = 1;
    }
    int count = 0;
    do {
        if(isValid(v)){
            count++;
        }
    } while(next_permutation(v.begin(), v.end()));
    cout << count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:13: error: 'next_permutation' was not declared in this scope
   41 |     } while(next_permutation(v.begin(), v.end()));
      |             ^~~~~~~~~~~~~~~~
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;

	for(auto&& w:g[i]){
	visited[i]=true;
	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:19:1: error: extended character 　 is not valid in an identifier
   19 | 　　visited[i]=false;
      | ^
a.cc:19:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'int dfs(int, int)':
a.cc:19:1: error: '\U00003000\U00003000visited' was not declared in this scope
   19 | 　　visited[i]=false;
      | ^~~~~~~~~~~