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

#include <bits/stdc++.h>
using namespace std;
 
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define vsort(v) sort(v.begin(), v.end());
#define rvisort(v) sort(v.begin(), v.end(), greater<int>());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define cout(d) cout<<d<<endl;
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);
#define replace_all(s, b, a) replace(s.begin(),s.end(), b, a);
// #define int long long
#define PI (acos(-1))
#define FILL(v, n, x) fill(v, v + n, x);
#define sz(x) int(x.size())
 
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using ul = unsigned 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; }
 
ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }
ll LCM(ll a, ll b) { return a / GCD(a, b)* b; }
 
const int dy[] = {0, 1, 0, -1, -1, 1, 1, -1};
const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
 
inline bool inside(int y, int x, int H, int W) {
    return (y >= 0 && x >= 0 && y < H && x < W);
}
 
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

int G[10][10];

signed main()
{
  cin.tie( 0 ); ios::sync_with_stdio( false );
  
  int n,m; cin>>n>>m;
  rep(i,m){
    int a,b; cin>>a>>b; a--,b--;
    G[a][b]=G[b][a]=1;
  }
  vi g;
  for(int i=1; i<n; i++) g.push_back(i);
  int ans=0;
  do{
    bool ok=true;
    if(G[0][g[0]]==0) ok=false;
    rep(i,n-2) if(G[g[i][i+1]]==0) ok=false;
    if(ok) ans++;
  }while(next_permutation(all(g)));
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:25: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}[int]' for array subscript
   67 |     rep(i,n-2) if(G[g[i][i+1]]==0) ok=false;
      |                         ^
Language: C++

#include <iostream>
using namespace std;
vector<vector<bool>> graph(8,vector<bool>(8)) ;

int dfs(int v, int N, bool visit[8]){
    
    
    bool all_Visit = true;  // 変数：全て訪問済
    
    // 全て訪問済か確認
    for(int i = 0; i < N; i++){
        if(visit[i] == false) all_Visit = false;
    }
    
    // 全て訪問のとき1を返して加える
    if(all_Visit) return 1;
    
    
    int ret = 0;  // 変数：今回の答えの値リピート
    
    for(int i = 0; i < N; i++){
        if(graph[v][i] == false) continue;  // 判定：入力時に値が入ってない
        if(visit[i]) continue; // ルート自身が存在しない時
        
        visit[i] = true;
        ret += dfs(i, N, visit);
        visit[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;
        A--, B--;
        graph[A][B] = graph[B][A] = true;
    }
    
    vector<bool> visit(8);
    for(int i = 0; i < N; i++){
        visit[i] = false;
    }
    
    visit[0] = true;
    cout << dfs(0, N, visit) << endl;
}


Compiler output:
a.cc:3:1: error: 'vector' does not name a type
    3 | vector<vector<bool>> graph(8,vector<bool>(8)) ;
      | ^~~~~~
a.cc: In function 'int dfs(int, int, bool*)':
a.cc:22:12: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   22 |         if(graph[v][i] == false) continue;  // 判定：入力時に値が入ってない
      |            ^~~~~
      |            isgraph
a.cc: In function 'int main()':
a.cc:47:9: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   47 |         graph[A][B] = graph[B][A] = true;
      |         ^~~~~
      |         isgraph
a.cc:50:5: error: 'vector' was not declared in this scope
   50 |     vector<bool> visit(8);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:50:12: error: expected primary-expression before 'bool'
   50 |     vector<bool> visit(8);
      |            ^~~~
a.cc:52:9: error: 'visit' was not declared in this scope
   52 |         visit[i] = false;
      |         ^~~~~
a.cc:2:1: note: 'std::visit' is defined in header '<variant>'; this is probably fixable by adding '#include <variant>'
    1 | #include <iostream>
  +++ |+#include <variant>
    2 | using namespace std;
a.cc:55:5: error: 'visit' was not declared in this scope
   55 |     visit[0] = true;
      |     ^~~~~
a.cc:55:5: note: 'std::visit' is defined in header '<variant>'; this is probably fixable by adding '#include <variant>'
Language: C++

#include<bits/stdc++.h>

using namespace std;
using Graph = vector<vector<int>>;

int main(){
  int N,M;
  cin >> N >> M;
  vector<int> v;

  for(int i = 0; i < N; i++){
    v.push_back(i);
  }

  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);
  }
  int cnt = 0;
  do{
    for(int i = 0; i < N; i++){
      if(i == N - 1) cnt++;
      else if(count(G[v[i]].begin(),G[v[i]].end(),v[i + 1]) == 0){
        break;
      }
    }
  }while(next_permutation(v.begin()+1,v.end()));

  cout << cnt << endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'G' was not declared in this scope
   20 |     G[a].push_back(b);
      |     ^
a.cc:27:21: error: 'G' was not declared in this scope
   27 |       else if(count(G[v[i]].begin(),G[v[i]].end(),v[i + 1]) == 0){
      |                     ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
typedef pair<int,int> P;
int main(){
  int n,m;cin>>n>>m;
  vector<P> nya(m);
  for(int i = 0; m > i; i++){
    cin >> nya[i].first>>nya[i].second;
  }
  vector<int> Pa(n);
  for(int i = 0; n > i; i++){
    Pa[i] = i+1;
  }
  int ans = 0;
  do{
    bool ad = true;
    for(int i = 0; n-1 > i; i++){
      bool ok = false;
      for(int j = 0; m > j; j++){
        if(min(nya[j].first,nya[j].second) == min(Pa[i],Pa[i+1]) && max(nya[j].first,nya[j].second) == max(Pa[i],Pa[i+1])){
          ok = true;
          break;
        }
      }
      if(!ok){
        ad = false;
        break;
      }
    }
    if(ad)ans++;   
  }while(next_permutation(Pa.begin(),Pa.end()));
  cout << ans << endl;
}


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

#include <iostream>
#include <vector>
using namespace std;
typedef pair<int,int> P;
int main(){
  int n,m;cin>>n>>m;
  vector<P> nya(m)
  for(int i = 0; m > i; i++){
    cin >> nya[i].first>>nya[i].second;
  }
  vector<int> P(n);
  for(int i = 0; n > i; i++){
    P[i] = i+1;
  }
  int ans = 0;
  do{
    bool ad = true;
    for(int i = 0; n-1 > i; i++){
      bool ok = false;
      for(int j = 0; m > j; j++){
        if(min(nya[j].first,nya[j].second) == min(P[i],P[i+1]) && max(nya[j].first,nya[j].second) == max(P[i],P[i+1])){
          ok = true;
          break;
        }
      }
      if(!ok){
        ad = false;
        break;
      }
    }
    if(ad)ans++;   
  }while(P.begin(),P.end());
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i = 0; m > i; i++){
      |   ^~~
a.cc:8:22: error: 'i' was not declared in this scope
    8 |   for(int i = 0; m > i; i++){
      |                      ^
a.cc:32:17: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::begin() [with _Tp = int; _Alloc = std::allocator<int>; iterator = std::vector<int>::iterator]', declared with attribute 'nodiscard' [-Wunused-result]
   32 |   }while(P.begin(),P.end());
      |          ~~~~~~~^~
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_vector.h:873:7: note: declared here
  873 |       begin() _GLIBCXX_NOEXCEPT
      |       ^~~~~
a.cc:32:19: error: could not convert '(((void)P.std::vector<int>::begin()), P.std::vector<int>::end())' from 'std::vector<int>::iterator' to 'bool'
   32 |   }while(P.begin(),P.end());
      |          ~~~~~~~~~^~~~~~~~
      |                   |
      |                   std::vector<int>::iterator
Language: C++

#include<iostream>
#include<vector>
#include<queue>
#include<string.h>
#include<algorithm>
#include<stack>
#include<set>
#include<numeric>

using namespace std;

int N,M;
int ans=0;
int graph[8][8];

void dfs(int i,int visited[N]);

int main(){
  cin>>N>>M;
  for (int m = 0; m < M; m++) {
    int a;cin>>a;
    int b;cin>>b;
    graph[a-1][b-1]=graph[b-1][a-1]=1;
  }
  int visited[N];
  for(int n=0;n<N;n++){
    visited[n]=0;
  }
  visited[0]=1;
  dfs(0,visited);
  cout<<ans<<"\n";

}

void dfs(int i,int visited[N]){
  for (int j = 0; j < N; j++) {
    if(graph[i][j]==1&&visited[j]==0){
      if(accumulate(visited,visited+N,0)==N-1){
        ans++;
        return;
      }
      visited[j]=1;
      dfs(j,visited);
      visited[j]=0;

    }
  }
}

Compiler output:
a.cc:16:28: error: size of array 'visited' is not an integral constant-expression
   16 | void dfs(int i,int visited[N]);
      |                            ^
a.cc:35:28: error: size of array 'visited' is not an integral constant-expression
   35 | void dfs(int i,int visited[N]){
      |                            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
const in INF=1<<30;
#define vec2(a,y,x) vector<vector<int>> a(y,vector<int>(x))
#define vec1(a,n) vector<int> a(n);rep(i,n)cin>>a[i]

bool belong(vector<int> a,int x){
  for(auto y:a){
  	if(y==x) return true;
  }
  return false;
}

int main(){
  int n,m;cin>>n>>m;
  int dai,nyu;
  vec2(tree,n,0);
  rep(i,m){
    cin>>dai>>nyu;
    dai --;nyu --;
    tree[dai].push_back(nyu);
    tree[nyu].push_back(dai);
  }
  vector<int> x(0);
  rep(i,n) x.push_back(i);
  sort(all(x));
  int cnt =0;
  

  do{
    bool flag =true;
    if(x.at(0)!=0) break;
    rep(i,n-1){
      if(!belong(tree[x[i]],x[i+1])){flag=false;break;}
    }
    if(flag) cnt ++;
  }while(next_permutation(all(x)));
cout<<ct<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:7: error: 'ct' was not declared in this scope; did you mean 'cnt'?
   44 | cout<<ct<<endl;
      |       ^~
      |       cnt
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool check(vector<int> &p,vector<vector<int>> &v)
{
  for(int i=0;i<p.size()-1;i++)
    if(v[p[i]][p[i+1]]==0)
      return false;
  return true;
}
int main()
{
  int n,m;
  cin>>n>>m;
  vector<vector<int>> v(n,vector<int>(n,0));
  for(int i=0;i<n;i++)
  {
    int a,b;
    cin>>a>>b;
    v[a-1][b-1]=1;
    v[b-1][a-1]=1;
  }
  vector<int> p(n);
  for(int i=0;i<n;i++)
    p[i]=i;
  int ans=0;
  do
  {
    if(check(p,v))
      ans++;
  }while(next_permutation(p.begin(),p.end());
  
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:45: error: expected ')' before ';' token
   30 |   }while(next_permutation(p.begin(),p.end());
      |         ~                                   ^
      |                                             )
Language: Java

import java.util.*;

public class Main {
    static int n;
    static int count = 0;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        List<Integer> nodes = new ArrayList<>();
        while(sc.hasNext()) {
            nodes.add(sc.nextInt() - 1);
        }

        n = nodes.size();
        LinkedList<Integer>[] graph = new LinkedList[n];
        for (int i = 0; i < n ; i+=2) {
            graph[i] = new LinkedList<>();
        }
        
        for (int i = 0; i < n ; i+=2) {
            int node1 = nodes.get(i);
            int node2 = nodes.get(i + 1);
            graph[node1].add(node2);
            graph[node2].add(node1);
        }
        Set<Integer> visited = new HashSet<>();
        helper(graph, 0, visited);
        return count;

    }

    private static void helper(LinkedList<Integer>[] graph, int current, Set<Integer> visited) {
        if (visited.size() == n) {
            count++;
            return;
        } 
        
        List<Integer> nexts = graph[current];
        for (int i =0; i < nexts.size(); i++) {
            int next = nexts.get(i);
            if(!visited.contains(next)) {
                visited.add(next);
                helper(graph, next, visited);
            } 
        }
    }
}


Compiler output:
Main.java:29: error: incompatible types: unexpected return value
        return count;
               ^
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int nmax=8;
bool graph[nmax][nmax];  



  bool visited[N]={};

int dsp(int viNodes,int nownode,bool visited[],int N){
  
  visited[nownode]=true;
  
  int ret=0;
  for(int i=0;i<N;i++){
    if(visited[i])continue;
    if(!graph[nownode][i])continue;
    
    if(viNodes==N-1){  
      visited[nownode]=false;
      return 1;
    }
    ret+=dsp(viNodes+1,i,visited,N);
  }
  
  visited[nownode]=false;
  return ret;
}


int main(void)
{
  int i;
  int N,M;
  bool visited[nmax]={};
  cin>>N>>M;
  
  for(i=0;i<N;i++)visited[i]=false;
  for(i=0;i<M;i++){
    cin>>i>>j;
    graph[i-1][j-1]=true;
    graph[j-1][i-1]=true;
  }
  
  cout <<dsp(1,0,visited,N)<< endl;
  return 0;
}




Compiler output:
a.cc:8:16: error: 'N' was not declared in this scope
    8 |   bool visited[N]={};
      |                ^
a.cc: In function 'int main()':
a.cc:40:13: error: 'j' was not declared in this scope
   40 |     cin>>i>>j;
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int nmax=8;
bool graph[nmax][nmax];  
bool visited[N]={};



  bool visited[N]={};

int dsp(int viNodes,int nownode,bool visited[],int N){
  
  visited[nownode]=true;
  
  int ret=0;
  for(int i=0;i<N;i++){
    if(visited[i])continue;
    if(!graph[nownode][i])continue;
    
    if(viNodes==N-1){  
      visited[nownode]=false;
      return 1;
    }
    ret+=dsp(viNodes+1,i,visited,N);
  }
  
  visited[nownode]=false;
  return ret;
}


int main(void)
{
  int i;
  int N,M;
  cin>>N>>M;
  
  for(i=0;i<N;i++)visited[i]=false;
  for(i=0;i<M;i++){
    cin>>i>>j;
    graph[i-1][j-1]=true;
    graph[j-1][i-1]=true;
  }
  
  cout <<dsp(1,0,visited,N)<< endl;
  return 0;
}




Compiler output:
a.cc:5:14: error: 'N' was not declared in this scope
    5 | bool visited[N]={};
      |              ^
a.cc:9:16: error: 'N' was not declared in this scope
    9 |   bool visited[N]={};
      |                ^
a.cc: In function 'int main()':
a.cc:38:19: error: 'visited' was not declared in this scope
   38 |   for(i=0;i<N;i++)visited[i]=false;
      |                   ^~~~~~~
a.cc:40:13: error: 'j' was not declared in this scope
   40 |     cin>>i>>j;
      |             ^
a.cc:45:18: error: 'visited' was not declared in this scope
   45 |   cout <<dsp(1,0,visited,N)<< endl;
      |                  ^~~~~~~
Language: C++

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

bool G[10][10];

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

    vector<int> ord(N);
    for(int i=0; i<N; i++){
        ord[i] = i;
    }

    int res = 0;
    do{
        if(ord[0] != 0) break;

        bool ok = true;
        for(int i=0; i+1 < N; i++){
            int from = ord[i];
            int to = ord[i+1];
            if(!G[from][to]) ok = false;
        }
        if(ok) ++res;
    }while(next_permutation(ord.begin(), ord.end()));

    cout << res << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
using Graph=vector<vector<int>>;

int sum=0;

void dfs(Graph &g,vector<bool> visit,int v){
  for(auto nv:g.at(v)){
    vector<bool> fin(visit.size(),true);
    if(visit==fin){
      sum++;
      break;
    }
    if(visit[nv]){
      continue;
    }
    visit[nv]=true;
    dfs(g,visit,nv);
  }
}

int main(){
  int N,M;
  Graph g(N);
  for(int i=0;i<M;i++){
    int a,b;
    cin>>a>>b;
    G.at(a-1).push_back(b-1);
    G.at(b-1).push_back(a-1);
  }
  
  vector<bool> visit(N,false);
  visit[0]=true;
  dfs(g,visit,0);
  
  cout<<sum<<endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:28:5: error: 'G' was not declared in this scope
   28 |     G.at(a-1).push_back(b-1);
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using Graph=vector<vector<int>>;

int sum=0;

void dfs(Graph &g,vector<bool> visit,int v){
  for(auto nv:g.at(v)){
    vector<bool> fin(visit.size(),true)
    if(visit==fin){
      sum++;
      break;
    }
    if(visit[nv]){
      continue;
    }
    visit[nv]=true;
    dfs(g,visit,nv);
  }
}

int main(){
  int N,M;
  Graph g(N);
  for(int i=0;i<M;i++){
    int a,b;
    cin>>a>>b;
    G.at(a-1).push_back(b-1);
    G.at(b-1).push_back(a-1);
  }
  
  vector<bool> visit(N,false);
  visit[0]=true;
  dfs(g,visit,0);
  
  cout<<sum<<endl;
}
  
  

Compiler output:
a.cc: In function 'void dfs(Graph&, std::vector<bool>, int)':
a.cc:10:5: error: expected ',' or ';' before 'if'
   10 |     if(visit==fin){
      |     ^~
a.cc: In function 'int main()':
a.cc:28:5: error: 'G' was not declared in this scope
   28 |     G.at(a-1).push_back(b-1);
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using Graph=vector<vector<int>>;

int sum=0;

void dfs(Graph &g,vector<bool> visit,int v){
  for(auto nv:g.at(v)){
    if(visit==make_vector<bool>(visit.size(),true)){
      sum++;
      break;
    }
    if(visit[nv]){
      continue;
    }
    visit[nv]=true;
    dfs(g,visit,nv);
  }
}

int main(){
  int N,M;
  Graph g(N);
  for(int i=0;i<M;i++){
    int a,b;
    cin>>a>>b;
    G.at(a-1).push_back(b-1);
    G.at(b-1).push_back(a-1);
  }
  
  vector<bool> visit(N,false);
  visit[0]=true;
  dfs(g,visit,0);
  
  cout<<sum<<endl;
}
  
  

Compiler output:
a.cc: In function 'void dfs(Graph&, std::vector<bool>, int)':
a.cc:9:15: error: 'make_vector' was not declared in this scope
    9 |     if(visit==make_vector<bool>(visit.size(),true)){
      |               ^~~~~~~~~~~
a.cc:9:27: error: expected primary-expression before 'bool'
    9 |     if(visit==make_vector<bool>(visit.size(),true)){
      |                           ^~~~
a.cc:9:27: error: expected ')' before 'bool'
    9 |     if(visit==make_vector<bool>(visit.size(),true)){
      |       ~                   ^~~~
      |                           )
a.cc: In function 'int main()':
a.cc:27:5: error: 'G' was not declared in this scope
   27 |     G.at(a-1).push_back(b-1);
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using Graph=vector<vector<int>>;

int sum=0;

void dfs(Graph &g,vector<bool> visit,int v){
  for(auto nv:g.at(i)){
    if(visit==make_vector<bool>(visit.size(),true)){
      sum++;
      break;
    }
    if(visit[nv]){
      continue;
    }
    visit[nv]=true;
    dfs(g,visit,nv);
  }
}

int main(){
  int N,M;
  Graph g(N);
  for(int i=0;i<M;i++){
    int a,b;
    cin>>a>>b;
    G.at(a-1).push_back(b-1);
    G.at(b-1).push_back(a-1);
  }
  
  vector<bool> visit(N,false);
  visit[0]=true;
  dfs(g,visit,0);
  
  cout<<sum<<endl;
}
  
  

Compiler output:
a.cc: In function 'void dfs(Graph&, std::vector<bool>, int)':
a.cc:8:20: error: 'i' was not declared in this scope
    8 |   for(auto nv:g.at(i)){
      |                    ^
a.cc:9:15: error: 'make_vector' was not declared in this scope
    9 |     if(visit==make_vector<bool>(visit.size(),true)){
      |               ^~~~~~~~~~~
a.cc:9:27: error: expected primary-expression before 'bool'
    9 |     if(visit==make_vector<bool>(visit.size(),true)){
      |                           ^~~~
a.cc:9:27: error: expected ')' before 'bool'
    9 |     if(visit==make_vector<bool>(visit.size(),true)){
      |       ~                   ^~~~
      |                           )
a.cc: In function 'int main()':
a.cc:27:5: error: 'G' was not declared in this scope
   27 |     G.at(a-1).push_back(b-1);
      |     ^
Language: C++

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

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

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

typedef long long ll;

#define MAX_N 10000

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

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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:74:7: error: 'using Graph = class std::vector<std::vector<int> >' {aka 'class std::vector<std::vector<int> >'} has no member named 'assing'; did you mean 'assign'?
   74 |     G.assing(N, vector<int>());
      |       ^~~~~~
      |       assign
Language: C++

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

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

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

typedef long long ll;

#define MAX_N 10000

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

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

Graph G;

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

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

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


Compiler output:
a.cc: In function 'int dfs(int, std::vector<bool>&, int&)':
a.cc:55:41: error: expected ')' before ';' token
   55 |     for (int i = 0; i < seen.size(); i++;)
      |         ~                               ^
      |                                         )
a.cc:55:42: error: expected primary-expression before ')' token
   55 |     for (int i = 0; i < seen.size(); i++;)
      |                                          ^
a.cc:60:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   60 |         return;
      |         ^~~~~~
a.cc:69:15: warning: control reaches end of non-void function [-Wreturn-type]
   69 |     seen[v] = false;
      |               ^~~~~
Language: C++

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

int m,n;
bool G[MAX_N][MAX_N];
bool visited[MAX_N];

int dfs(int u, bool visited2[MAX_N]){
    bool flag = true;
    for(int i =0; i < n; ++i){
        if( !visited2[i] ){
            flag = false;
            break;
        }
    }
    if(flag) return 1;

    int res = 0;
    for(int v = 0; i < n; v++){
        if( !G[u][v] ) continue;
        if( !visited2[v]){
            visited2[v] = true;
            res += dfs(v, visited2);
            visited2[v] = false;
        }
    }
    visited2[u] = true;
    return res;
}

int main(){
    cin>>n>>m;
    for(int i=0;i < n; i++){
        int a, b;
        cin>>a>>b;
        a--;b--;
        G[a][b] = G[b][a] = true;
    }

    visited[0] = true;
    int ans = dfs(0,visited);
    cout<< ans <<endl;
}

Compiler output:
a.cc: In function 'int dfs(int, bool*)':
a.cc:21:20: error: 'i' was not declared in this scope
   21 |     for(int v = 0; i < n; v++){
      |                    ^
Language: C++

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

int m,n;
bool G[MAX_N][MAX_N];
bool visited[MAX_N];

int dfs(int u, bool visited2[MAX_N]){
    bool flag = true;
    for(int i =0; i < n; ++i){
        if( !visited2[i] ){
            flag = false;
            break;
        }
    }
    if(flag) return 1;

    int res = 0;
    for(int v = 0; i < n; v++){
        if( !G[u][v] ) continue;
        if( !visited2[v]){
            visited2[v] = true;
            res += dfs(v, visited2);
            visited2[v] = false;
        }
    }
    visited2[u] = true;
    return res;
}

int main(){
    cin>>n>>m:
    for(int i=0;i < n; i++){
        int a, b;
        cin>>a>>b;
        a--;b--;
        G[a][b] = G[b][a] = true;
    }

    visited[0] = true;
    int ans = dfs(0,visited);
    cout<< ans <<endl;
}

Compiler output:
a.cc: In function 'int dfs(int, bool*)':
a.cc:21:20: error: 'i' was not declared in this scope
   21 |     for(int v = 0; i < n; v++){
      |                    ^
a.cc: In function 'int main()':
a.cc:34:14: error: expected ';' before ':' token
   34 |     cin>>n>>m:
      |              ^
      |              ;
a.cc:35:17: error: 'i' was not declared in this scope
   35 |     for(int i=0;i < n; i++){
      |                 ^
Language: C++

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

int G[MAX_N][MAX_N];
int n,m;
bool visited[MAX_N];

void dfs(int u, bool visited2[MAX_N]){
    bool flag = true;
    for(int i = 0; i < n; i++){
        if( !visited2[i] ){
            flag = false;
            break;
        }
    }
    if(flag) return 1;
    
    int res = 0;
    for(int v = 0; v < n; v++ ){
        if( G[u][v] == 0 )continue;
        if( !visited[v] ){
            visited2[v] = true;
            res += dfs( v, visited2);
            visited2[v] = false;
        }
    } 
    visited2[u] = true;
    return res;
}

int main(){
    cin>> n >> m;
    for(int i=0; i<m; i++){
        int a,b;
        cin>>a>>b;
        a--;b--;
        G[a][b] = G[b][a] = 1;
    }
    
    visited[0] = true;
    int ans = dfs(0,visited);

    cout<< ans <<endl;
}

Compiler output:
a.cc: In function 'void dfs(int, bool*)':
a.cc:18:21: error: return-statement with a value, in function returning 'void' [-fpermissive]
   18 |     if(flag) return 1;
      |                     ^
a.cc:25:23: error: void value not ignored as it ought to be
   25 |             res += dfs( v, visited2);
      |                    ~~~^~~~~~~~~~~~~~
a.cc:30:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
   30 |     return res;
      |            ^~~
a.cc: In function 'int main()':
a.cc:43:18: error: void value not ignored as it ought to be
   43 |     int ans = dfs(0,visited);
      |               ~~~^~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool flag[10];
int N,M;
vector<vector<int>>G;
int rec(int now){
  flag[now]=true;
  int cnt=0;
  for(int i=1;i<=N;i++){
    if(!flag[i])break;
    cnt++;
  }
  if(cnt==N)return 1;
  int ans=0;
  for(auto e:G[now]){
    if(!flag[e]){
      ans+=rec(G,e);
      flag[e]=false;
    }
  }
  return ans;
}
int main(){
  cin>>N>>M;
  G.resize(N+1);
  for(int i=0;i<M;i++){
    int a,b;
    cin>>a>>b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  cout<<rec(G,1)<<endl;
}


Compiler output:
a.cc: In function 'int rec(int)':
a.cc:17:16: error: cannot convert 'std::vector<std::vector<int> >' to 'int'
   17 |       ans+=rec(G,e);
      |                ^
      |                |
      |                std::vector<std::vector<int> >
a.cc:6:13: note:   initializing argument 1 of 'int rec(int)'
    6 | int rec(int now){
      |         ~~~~^~~
a.cc: In function 'int main()':
a.cc:32:13: error: cannot convert 'std::vector<std::vector<int> >' to 'int'
   32 |   cout<<rec(G,1)<<endl;
      |             ^
      |             |
      |             std::vector<std::vector<int> >
a.cc:6:13: note:   initializing argument 1 of 'int rec(int)'
    6 | int rec(int now){
      |         ~~~~^~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define MAX_N 8
#define WHITE 0
#define GRAY 1
#define BLACK 2
using namespace std;


int M[8][8];
int n,e;

int dfs_visit(int u,int color2[MAX_N]){
    bool all_visited = true;
    for(int i =0;i<n;i++){
        if(color2[i] == WHITE) {
            all_visited = false;
            break;
        }
    }
    if(all_visited) return 1;

    int res = 0;
    color2[u] = GRAY;
    for(int v = 0; v < n; v++){
        if(M[u][v] == 0)continue;
        if(color2[v] == WHITE){
            res += dfs_visit(v,color2);
            color2[u] = WHITE;
        }
    }
    color2[u] = BLACK;
    retrn res;
}

int dfs(){
    int color[MAX_N];
    for(int i=0; i < n ; i++) color[i] = WHITE;
    int u = 0;

    int ans = dfs_visit(u, color);
    return ans;
}

int main(){
    cin>>n>>e;
    for(int i =0;i<n;i++){
        for(int j=0;j<n;j++)M[i][j] = 0;
    }
    for(int i=0;i<e;i++){
        int u,v;
        scanf("%d %d",&u,&v);
        u--;
        v--;
        M[u][v] = 1;
    }
    cout<<dfs()<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int dfs_visit(int, int*)':
a.cc:33:5: error: 'retrn' was not declared in this scope
   33 |     retrn res;
      |     ^~~~~
a.cc:32:15: warning: control reaches end of non-void function [-Wreturn-type]
   32 |     color2[u] = BLACK;
      |               ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define MAX_N 8
#define WHITE 0
#define GRAY 1
#define BLACK 2
using namespace std;


int M[8][8];
int n,e;

int dfs_visit(int u,int color2[MAX_N]){
    bool all_visited = true;
    for(int i =0;i<n;i++){
        if(color2[i] == WHITE) {
            all_visited = false;
            break;
        }
    }
    if(all_visited) return 1;

    int res = 0;
    color2[u] = GRAY;
    for(int v = 0; v < n; v++){
        if(M[u][v] == 0)continue;
        if(color2[v] == WHITE){
            res += dfs_visit(v);
            color2[u] = WHITE;
        }
    }
    color2[u] = BLACK;
    retrn res;
}

int dfs(){
    int color[MAX_N];
    for(int i=0; i < n ; i++) color[i] = WHITE;
    int u = 0;

    int ans = dfs_visit(u, color);
    return ans;
}

int main(){
    cin>>n>>e;
    for(int i =0;i<n;i++){
        for(int j=0;j<n;j++)M[i][j] = 0;
    }
    for(int i=0;i<e;i++){
        int u,v;
        scanf("%d %d",&u,&v);
        u--;
        v--;
        M[u][v] = 1;
    }
    cout<<dfs()<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int dfs_visit(int, int*)':
a.cc:28:29: error: too few arguments to function 'int dfs_visit(int, int*)'
   28 |             res += dfs_visit(v);
      |                    ~~~~~~~~~^~~
a.cc:13:5: note: declared here
   13 | int dfs_visit(int u,int color2[MAX_N]){
      |     ^~~~~~~~~
a.cc:33:5: error: 'retrn' was not declared in this scope
   33 |     retrn res;
      |     ^~~~~
a.cc:32:15: warning: control reaches end of non-void function [-Wreturn-type]
   32 |     color2[u] = BLACK;
      |               ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define WHITE 0
#define GRAY 1
#define BLACK 2
using namespace std;


int M[8][8];
int n,e;

int dfs_visit(int u,int color2[n]){
    bool all_visited = true;
    for(int i =0;i<n;i++){
        if(color2[i] == WHITE) {
            all_visited = false;
            break;
        }
    }
    if(all_visited) return 1;

    int res = 0;
    color2[u] = GRAY;
    for(int v = 0; v < n; v++){
        if(M[u][v] == 0)continue;
        if(color2[v] == WHITE){
            res += dfs_visit(v);
            color2[u] = WHITE;
        }
    }
    color[u]2 = BLACK;
    retrn res;
}

int dfs(){
    for(int i=0; i < n ; i++) color[i] = WHITE;
    int u = 0;

    int ans = dfs_visit(u, color);
    return ans;
}

int main(){
    cin>>n>>e;
    for(int i =0;i<n;i++){
        for(int j=0;j<n;j++)M[i][j] = 0;
    }
    for(int i=0;i<e;i++){
        int u,v;
        scanf("%d %d",&u,&v);
        u--;
        v--;
        M[u][v] = 1;
    }
    cout<<dfs()<<endl;
    return 0;
}


Compiler output:
a.cc:12:32: error: size of array 'color2' is not an integral constant-expression
   12 | int dfs_visit(int u,int color2[n]){
      |                                ^
a.cc: In function 'int dfs_visit(int, int*)':
a.cc:27:29: error: too few arguments to function 'int dfs_visit(int, int*)'
   27 |             res += dfs_visit(v);
      |                    ~~~~~~~~~^~~
a.cc:12:5: note: declared here
   12 | int dfs_visit(int u,int color2[n]){
      |     ^~~~~~~~~
a.cc:31:5: error: 'color' was not declared in this scope; did you mean 'color2'?
   31 |     color[u]2 = BLACK;
      |     ^~~~~
      |     color2
a.cc:32:5: error: 'retrn' was not declared in this scope
   32 |     retrn res;
      |     ^~~~~
a.cc: In function 'int dfs()':
a.cc:36:31: error: 'color' was not declared in this scope
   36 |     for(int i=0; i < n ; i++) color[i] = WHITE;
      |                               ^~~~~
a.cc:39:28: error: 'color' was not declared in this scope
   39 |     int ans = dfs_visit(u, color);
      |                            ^~~~~
a.cc: In function 'int dfs_visit(int, int*)':
a.cc:33:1: warning: control reaches end of non-void function [-Wreturn-type]
   33 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define WHITE 0
#define GRAY 1
#define BLACK 2
using namespace std;


int M[8][8];
int n,e;

int dfs_visit(int u,int color2[]){
    bool all_visited = true;
    for(int i =0;i<n;i++){
        if(color2[i] == WHITE) {
            all_visited = false;
            break;
        }
    }
    if(all_visited) return 1;

    int res = 0;
    color2[u] = GRAY;
    for(int v = 0; v < n; v++){
        if(M[u][v] == 0)continue;
        if(color2[v] == WHITE){
            res += dfs_visit(v);
            colo2[u] = WHITE;
        }
    }
    color[u]2 = BLACK;
    retrn res;
}

int dfs(){
    for(int i=0; i < n ; i++) color[i] = WHITE;
    int u = 0;

    int ans = dfs_visit(u, color);
    return ans;
}

int main(){
    cin>>n>>e;
    for(int i =0;i<n;i++){
        for(int j=0;j<n;j++)M[i][j] = 0;
    }
    for(int i=0;i<e;i++){
        int u,v;
        scanf("%d %d",&u,&v);
        u--;
        v--;
        M[u][v] = 1;
    }
    cout<<dfs()<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int dfs_visit(int, int*)':
a.cc:27:29: error: too few arguments to function 'int dfs_visit(int, int*)'
   27 |             res += dfs_visit(v);
      |                    ~~~~~~~~~^~~
a.cc:12:5: note: declared here
   12 | int dfs_visit(int u,int color2[]){
      |     ^~~~~~~~~
a.cc:28:13: error: 'colo2' was not declared in this scope; did you mean 'color2'?
   28 |             colo2[u] = WHITE;
      |             ^~~~~
      |             color2
a.cc:31:5: error: 'color' was not declared in this scope; did you mean 'color2'?
   31 |     color[u]2 = BLACK;
      |     ^~~~~
      |     color2
a.cc:32:5: error: 'retrn' was not declared in this scope
   32 |     retrn res;
      |     ^~~~~
a.cc: In function 'int dfs()':
a.cc:36:31: error: 'color' was not declared in this scope
   36 |     for(int i=0; i < n ; i++) color[i] = WHITE;
      |                               ^~~~~
a.cc:39:28: error: 'color' was not declared in this scope
   39 |     int ans = dfs_visit(u, color);
      |                            ^~~~~
a.cc: In function 'int dfs_visit(int, int*)':
a.cc:33:1: warning: control reaches end of non-void function [-Wreturn-type]
   33 | }
      | ^
Language: C++

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

#define MAX_V  8

vector<int> G[MAX_V]; 
int visited[ MAX_V ] ;
int nt[ MAX_V ] ;
int cnt = 0;
int res = 0;
int V,E;
int s,t;

int next(int u){
    for(int v = nt[u];  v < G[u].size(); v++){
        int nt[u] = v;
        if( G[u][v] )return v;
    }
    return -1;
}

int dfs(){
    stack<int>st;
    st.push(1);
    visited[1] = 1;
    cnt++;

    while( !st.empty() ){
        if(cnt == V)res++;
        int u = st.top();
        int v = next(u);
        if(v != -1){
            if(visited[v] == 0){
            st.push(v);
            visited[v] = 1;
            cnt++;
            }
        }else{
            st.pop();
            visited[u] = 2;
            cnt--;
        }
    }
}

int main(){
    cin>>V>>E;
    for(int i =0; i < E; i++){
        cin>>s>> t;
        G[s].push_back(t);
        G[t].push_back(s);
    }
    fill(nt,nt + V,1);
    fill(visited, visited + V, 0);
    dfs();
    printf("%d¥n", res);
    return 0;
}


Compiler output:
a.cc: In function 'int next(int)':
a.cc:17:21: error: array must be initialized with a brace-enclosed initializer
   17 |         int nt[u] = v;
      |                     ^
a.cc: In function 'int dfs()':
a.cc:45:1: warning: no return statement in function returning non-void [-Wreturn-type]
   45 | }
      | ^
Language: C++

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

#define MAX_V  8

vector<int> G[MAX_V]; 
int visited[ MAX_V ] ;
int nt[ MAX_V ] ;
int cnt = 0;
int res = 0;
int V,E;
int s,t;

int next(int u){
    for(int v = nt[u];  v < G[u].size(); v++){
        int nt[u] = v+1;
        if( G[u][v] )return v;
    }
    return -1;
}

int dfs(){
    stack<int>st;
    st.push(1);
    visited[1] = 1;
    cnt++;

    while( !st.empty() ){
        if(cnt == V)res++;
        int u = st.top();
        int v = next(u);
        if(v != -1){
            if(visited[v] == 0){
            st.push(v);
            visited[v] = 1;
            cnt++;
            }
        }else{
            st.pop();
            visited[u] = 2;
            cnt--;
        }
    }
}

int main(){
    cin>>V>>E;
    for(int i =0; i < E; i++){
        cin>>s>> t;
        G[s].push_back(t);
        G[t].push_back(s);
    }
    fill(nt,nt + V,1);
    fill(visited, visited + V, 0);
    dfs();
    printf("%d¥n", res);
    return 0;
}


Compiler output:
a.cc: In function 'int next(int)':
a.cc:17:22: error: array must be initialized with a brace-enclosed initializer
   17 |         int nt[u] = v+1;
      |                     ~^~
a.cc: In function 'int dfs()':
a.cc:45:1: warning: no return statement in function returning non-void [-Wreturn-type]
   45 | }
      | ^
Language: C++

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

#define MAX_V  8

vector<int> G[MAX_V][MAX_V]; 
int visited[ MAX_V ] ;
int nt[ MAX_V ] ;
int cnt = 0;
int res = 0;
int V,E;
int s,t;

int next(int u){
    for(int j = nt[u];  j < G[u].size(); j++){
        int v = G[u][j];
        if( visited[v] != 1 ){
            nt[u] = j;
            return v;
        }
    }
    return -1;
}

int dfs(){
    stack<int>st;
    st.push(1);
    visited[1] = 1;
    cnt++;

    while( !st.empty() ){
        if(cnt == V)res++;
        int u = st.top();
        int v = next(u);
        if(v != -1){
            if(visited[v] != 0)continue;
            st.push(v);
            visited[v] = 1;
            cnt++;
        }else{
            st.pop();
            visited[u] = 2;
            cnt--;
        }
    }
}

int main(){
    cin>>V>>E;
    for(int i =0; i < E; i++){
        cin>>s>> t;
        G[s].push_back(t);
        G[t].push_back(s);
    }
    fill(nt,nt + V,1);
    fill(visited, visited + V, 0);
    dfs();
    printf("%d¥n", res);
    return 0;
}


Compiler output:
a.cc: In function 'int next(int)':
a.cc:16:34: error: request for member 'size' in 'G[u]', which is of non-class type 'std::vector<int> [8]'
   16 |     for(int j = nt[u];  j < G[u].size(); j++){
      |                                  ^~~~
a.cc:17:23: error: cannot convert 'std::vector<int>' to 'int' in initialization
   17 |         int v = G[u][j];
      |                 ~~~~~~^
      |                       |
      |                       std::vector<int>
a.cc: In function 'int dfs()':
a.cc:47:1: warning: no return statement in function returning non-void [-Wreturn-type]
   47 | }
      | ^
a.cc: In function 'int main()':
a.cc:53:14: error: request for member 'push_back' in 'G[s]', which is of non-class type 'std::vector<int> [8]'
   53 |         G[s].push_back(t);
      |              ^~~~~~~~~
a.cc:54:14: error: request for member 'push_back' in 'G[t]', which is of non-class type 'std::vector<int> [8]'
   54 |         G[t].push_back(s);
      |              ^~~~~~~~~
Language: C++

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

#define MAX_V  8

vector<vector<int>> G[MAX_V][MAX_V]; 
int visited[ MAX_V ] ;
int nt[ MAX_V ] ;
int cnt = 0;
int res = 0;
int V,E;
int s,t;

int next(int u){
    for(int j = nt[u];  j < G[u].size(); j++){
        int v = G[u][j];
        if( visited[v] != 1 ){
            nt[u] = j;
            return v;
        }
    }
    return -1;
}

int dfs(){
    stack<int>st;
    st.push(1);
    visited[1] = 1;
    cnt++;

    while( !st.empty() ){
        if(cnt == V)res++;
        int u = st.top();
        int v = next(u);
        if(v != -1){
            if(visited[v] != 0)continue;
            st.push(v);
            visited[v] = 1;
            cnt++;
        }else{
            st.pop();
            visited[u] = 2;
            cnt--;
        }
    }
}

int main(){
    cin>>V>>E;
    for(int i =0; i < E; i++){
        cin>>s>> t;
        G[s].push_back(t);
        G[t].push_back(s);
    }
    fill(nt,nt + V,1);
    fill(visited, visited + V, 0);
    dfs();
    printf("%d¥n", res);
    return 0;
}


Compiler output:
a.cc: In function 'int next(int)':
a.cc:16:34: error: request for member 'size' in 'G[u]', which is of non-class type 'std::vector<std::vector<int> > [8]'
   16 |     for(int j = nt[u];  j < G[u].size(); j++){
      |                                  ^~~~
a.cc:17:23: error: cannot convert 'std::vector<std::vector<int> >' to 'int' in initialization
   17 |         int v = G[u][j];
      |                 ~~~~~~^
      |                       |
      |                       std::vector<std::vector<int> >
a.cc: In function 'int dfs()':
a.cc:47:1: warning: no return statement in function returning non-void [-Wreturn-type]
   47 | }
      | ^
a.cc: In function 'int main()':
a.cc:53:14: error: request for member 'push_back' in 'G[s]', which is of non-class type 'std::vector<std::vector<int> > [8]'
   53 |         G[s].push_back(t);
      |              ^~~~~~~~~
a.cc:54:14: error: request for member 'push_back' in 'G[t]', which is of non-class type 'std::vector<std::vector<int> > [8]'
   54 |         G[t].push_back(s);
      |              ^~~~~~~~~
Language: C++

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

#define MAX_V  8

vector<vector<<int>> G[MAX_V][MAX_V]; 
int visited[ MAX_V ] ;
int nt[ MAX_V ] ;
int cnt = 0;
int res = 0;
int V,E;
int s,t;

int next(int u){
    for(int j = nt[u];  j < G[u].size(); j++){
        int v = G[u][j];
        if( visited[v] != 1 ){
            nt[u] = j;
            return v;
        }
    }
    return -1;
}

int dfs(){
    stack<int>st;
    st.push(1);
    visited[1] = 1;
    cnt++;

    while( !st.empty() ){
        if(cnt == V)res++;
        int u = st.top();
        int v = next(u);
        if(v != -1){
            if(visited[v] != 0)continue;
            st.push(v);
            visited[v] = 1;
            cnt++;
        }else{
            st.pop();
            visited[u] = 2;
            cnt--;
        }
    }
}

int main(){
    cin>>V>>E;
    for(int i =0; i < E; i++){
        cin>>s>> t;
        G[s].push_back(t);
        G[t].push_back(s);
    }
    fill(nt,nt + V,1);
    fill(visited, visited + V, 0);
    dfs();
    printf("%d¥n", res);
    return 0;
}


Compiler output:
a.cc:7:19: error: template argument 1 is invalid
    7 | vector<vector<<int>> G[MAX_V][MAX_V];
      |                   ^~
a.cc:7:19: error: template argument 2 is invalid
a.cc: In function 'int next(int)':
a.cc:16:34: error: request for member 'size' in 'G[u]', which is of non-class type 'int [8]'
   16 |     for(int j = nt[u];  j < G[u].size(); j++){
      |                                  ^~~~
a.cc: In function 'int dfs()':
a.cc:47:1: warning: no return statement in function returning non-void [-Wreturn-type]
   47 | }
      | ^
a.cc: In function 'int main()':
a.cc:53:14: error: request for member 'push_back' in 'G[s]', which is of non-class type 'int [8]'
   53 |         G[s].push_back(t);
      |              ^~~~~~~~~
a.cc:54:14: error: request for member 'push_back' in 'G[t]', which is of non-class type 'int [8]'
   54 |         G[t].push_back(s);
      |              ^~~~~~~~~
Language: C++

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

#define MAX_V  8

vector<int> G[ MAX_V ] 
vector<int> visited[ MAX_V ] ;
int nt[ MAX_V ] ;
int cnt = 0;
int res = 0;
int V,E;
int s,t;

int next(int u){
    for(int j = nt[u];  j < G[u].size(); j++){
        int v = G[u][j];
        if( visited[v] != 1 ){
            nt[u] = j;
            return v;
        }
    }
    return -1;
}

int dfs(){
    stack<int>st;
    st.push(1);
    visited[1] = 1;
    cnt++;

    while( !st.empty() ){
        if(cnt == V)res++;
        int u = st.top();
        int v = next(u);
        if(v != -1){
            
            st.push(v);
            visited[v] = 1;
            cnt++;
        }else{
            st.pop();
            visited[u] = 2;
            cnt--;
        }
    }
}

int main(){
    cin>>V>>E;
    for(int i =0; i < E; i++){
        cin>>s>> t;
        G[s].push_back(t);
        G[t].push_back(s);
    }
    fill(nt,nt + V,1);
    fill(visited, visited + V, 0);
    dfs();
    printf("%d¥n", res);
}


Compiler output:
a.cc:8:1: error: expected initializer before 'vector'
    8 | vector<int> visited[ MAX_V ] ;
      | ^~~~~~
a.cc: In function 'int next(int)':
a.cc:16:29: error: 'G' was not declared in this scope
   16 |     for(int j = nt[u];  j < G[u].size(); j++){
      |                             ^
a.cc:18:13: error: 'visited' was not declared in this scope
   18 |         if( visited[v] != 1 ){
      |             ^~~~~~~
a.cc: In function 'int dfs()':
a.cc:29:5: error: 'visited' was not declared in this scope
   29 |     visited[1] = 1;
      |     ^~~~~~~
a.cc:47:1: warning: no return statement in function returning non-void [-Wreturn-type]
   47 | }
      | ^
a.cc: In function 'int main()':
a.cc:53:9: error: 'G' was not declared in this scope
   53 |         G[s].push_back(t);
      |         ^
a.cc:57:10: error: 'visited' was not declared in this scope
   57 |     fill(visited, visited + V, 0);
      |          ^~~~~~~