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]) all_visited=false;
  if(all_visited) return 1;  
  int ret = 0;
  for(int i=0;i<N;++i){
    if(!graph[v][i] || visited[i]) continue;
    visited[i] = true;
    ret+= dfs(i,N,visited);
    visited[i] = false;
  }
  return ret;
}

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

Compiler output:
a.cc:6:14: error: expected ')' before ';' token
    6 | int dfs(int v;int N;bool visited[nmax]){
      |        ~     ^
      |              )
a.cc:6:39: error: expected initializer before ')' token
    6 | int dfs(int v;int N;bool visited[nmax]){
      |                                       ^
a.cc: In function 'int main()':
a.cc:31:14: error: too many arguments to function 'int dfs(int)'
   31 |   cout << dfs(0,N,visited) << endl;
      |           ~~~^~~~~~~~~~~~~
a.cc:6:5: note: declared here
    6 | int dfs(int v;int N;bool visited[nmax]){
      |     ^~~
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;
      break;
    }
  }
  
  if(all_visited){
    return 1;
  }
  
  int ret = 0;
  for(int i = 0; i<N;++i){
    if(graph[v][i] == false) continue;
    if(visited[i] == true) continue;
    
    visited[i] = true;
    ret+=dfs(i,N,visited);
    visited[i] = false;
  }
  
  return ret;
}

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:23: error: expected ';' before '}' token
   46 |     visited[i] = false
      |                       ^
      |                       ;
   47 |   }
      |   ~                    
a.cc:51:11: error: 'bfs' was not declared in this scope; did you mean 'ffs'?
   51 |   cout << bfs(0,N,visited) << endl;
      |           ^~~
      |           ffs
Language: C++

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

bool hantei(vector<int> &j,vector<vector<int>> &A){
  for(vector<int> &i:A)
    if(i==j)
      return true;
  return false;
}

int main(){
  int N,M;
  cin>>N>>M;
  vector<vector<int>> A(M,vector<int>(2));
  for(vector<int> &i:A){
    int j,k;
    cin>>j>>k;
    i={j-1,k-1};
  }
  vector<int> v={};
  for(int i=1;i<N;i++)
    v.push_back(i);
  int k=0;
  do{
    if(!hantei({0,v.at(0)},A))
      continue;
    for(int i=0;i<N-1;i++)
      if(!hantei({v.at(i),v.at(i+1)},A))
        continue;
    k++;
  }while (next_permutation(v.begin(), v.end()));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:15: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
   25 |     if(!hantei({0,v.at(0)},A))
      |         ~~~~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:678:7: note:   after user-defined conversion: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
  678 |       vector(initializer_list<value_type> __l,
      |       ^~~~~~
a.cc:4:26: note:   initializing argument 1 of 'bool hantei(std::vector<int>&, std::vector<std::vector<int> >&)'
    4 | bool hantei(vector<int> &j,vector<vector<int>> &A){
      |             ~~~~~~~~~~~~~^
a.cc:28:17: error: cannot bind non-const lvalue reference of type 'std::vector<int>&' to an rvalue of type 'std::vector<int>'
   28 |       if(!hantei({v.at(i),v.at(i+1)},A))
      |           ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_vector.h:678:7: note:   after user-defined conversion: 'std::vector<_Tp, _Alloc>::vector(std::initializer_list<_Tp>, const allocator_type&) [with _Tp = int; _Alloc = std::allocator<int>; allocator_type = std::allocator<int>]'
  678 |       vector(initializer_list<value_type> __l,
      |       ^~~~~~
a.cc:4:26: note:   initializing argument 1 of 'bool hantei(std::vector<int>&, std::vector<std::vector<int> >&)'
    4 | bool hantei(vector<int> &j,vector<vector<int>> &A){
      |             ~~~~~~~~~~~~~^
Language: C++

// #include <bits/stdc++.h>
// typedef long long int ll;

// using namespace std;

// int dfs(int v, vector<vector<int>> A, vector<int> visit, int &count)
// {
//     bool all_flag = 1;

//     for (int i = 0; i < visit.size(); i++)
//     {

//         if (visit[i] == 0)
//         {
//             all_flag = 0;
//         }
//     }

//     if (all_flag == 1)
//     {
//         //count++;
//         return 1;
//     }

//     int mas=0;

//     for (int w : A[v])
//     {
//         if (visit[w] == 0)
//         {
      
//             visit[w] = 1;
//             mas+=dfs(w, A, visit, count);
//             visit[w] = 0;
//         }
//     }

//     return mas;
// }

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

//     vector<vector<int>> A(N, vector<int>(0));

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

//         int a, b;
//         cin >> a >> b;

//         A[a - 1].push_back(b - 1);
//         A[b - 1].push_back(a - 1);
//     }

//     vector<int> visit(N, 0);

//     visit[0] = 1;

//     int count = 0;
//     count =dfs(0, A, visit, count);

//     cout << count << endl;
//     return 0;
// }


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:103:2: error: 'cin' was not declared in this scope
  103 |  cin >> N >> M;
      |  ^~~
a.cc:117:2: error: 'cout' was not declared in this scope
  117 |  cout << dfs(0,N,visited) << endl;
      |  ^~~~
a.cc:117:30: error: 'endl' was not declared in this scope
  117 |  cout << dfs(0,N,visited) << endl;
      |                              ^~~~
Language: C++

#include <bits/stdc++.h>
typedef long long int ll;

using namespace std;

int dfs(int v, vector<vector<int>> A, vector<int> visit, int &count)
{
    bool all_flag = 1;

    for (int i = 0; i < visit.size(); i++)
    {

        if (visit[i] == 0)
        {
            all_flag = 0;
        }
    }

    if (all_flag == 1)
    {
        count++;
        return 0;
    }

    for (int w : A[v])
    {
        if (visit[w] == 0)
        {
            stop_flag = 0;
            visit[w] = 1;
            dfs(w, A, visit, count);
            visit[w] = 0;
        }
    }

    return 0;
}

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

    vector<vector<int>> A(N, vector<int>(0));

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

        int a, b;
        cin >> a >> b;

        A[a - 1].push_back(b - 1);
        A[b - 1].push_back(a - 1);
    }

    vector<int> visit(N, 0);

    visit[0] = 1;

    int count = 0;
    dfs(0, A, visit, count);

    cout << count << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int dfs(int, std::vector<std::vector<int> >, std::vector<int>, int&)':
a.cc:29:13: error: 'stop_flag' was not declared in this scope
   29 |             stop_flag = 0;
      |             ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
typedef long long int ll;

using namespace std;

int dfs(int v, vector<vector<int>> A, vector<int> visit, int &count)
{
    bool stop_flag = 1;
    visit[v] = 1;
    for (int w :A[v])
    {
        if (visit[w] == 0)
        {
            stop_flag = 0;

            dfs(w, A, visit,count);
        }
    }
    if(stop_flag ==1){

        for(int i=0;i<visit.size();i++){

            if(visit[i]==0){
                return 0;
            }
        }
        count++;




        return 0;
    }

   
}

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

    vector<vector<int>> A(N, vector<int>(0));

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

        int a, b;
        cin >> a >> b;

        A[a - 1].push_back(b - 1) ;
        A[b - 1].push_back(a - 1) ;
    }
#include <bits/stdc++.h>
typedef long long int ll;

using namespace std;

int dfs(int v, vector<vector<int>> A, vector<int> visit, int &count)
{
    bool stop_flag = 1;
    visit[v] = 1;
    for (int w : A[v])
    {
        if (visit[w] == 0)
        {
            stop_flag = 0;

            dfs(w, A, visit, count);
        }
    }

    for (int i = 0; i < visit.size(); i++)
    {

        if (visit[i] == 0)
        {
            return 0;
        }
    }
    count++;

    return 0;
}

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

    vector<vector<int>> A(N, vector<int>(0));

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

        int a, b;
        cin >> a >> b;

        A[a - 1].push_back(b - 1);
        A[b - 1].push_back(a - 1);
    }

    vector<int> visit(N, 0);

    visit[0] = 1;

    int count = 0;
    dfs(0, A, visit, count);

    cout << count << endl;
    return 0;
}
    vector<int> visit(N,0);

    visit[0] = 1;

    int count=0;
    dfs(0,A,visit,count);

    cout << count << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:1: error: a function-definition is not allowed here before '{' token
   60 | {
      | ^
a.cc:86:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   86 | int main()
      |         ^~
a.cc:86:9: note: remove parentheses to default-initialize a variable
   86 | int main()
      |         ^~
      |         --
a.cc:86:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:87:1: error: a function-definition is not allowed here before '{' token
   87 | {
      | ^
a.cc: In function 'int dfs(int, std::vector<std::vector<int> >, std::vector<int>, int&)':
a.cc:36:1: warning: control reaches end of non-void function [-Wreturn-type]
   36 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);i++)
typedef long long ll;
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; //全部-1してる
        G[a][b] = G[b][a] = true; //道が繋がっているところはture
    }

    // 順列
    vector<int> su(N);
    for (int i = 0; i < N; ++i) su[i] = i; //ベクトルに0〜n-1を格納

    // 順列を全部試すa
    int ans = 0;
    do {
        if (su[0] != 0) break;

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

    cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:13: error: 'res' was not declared in this scope; did you mean 'rep'?
   34 |     cout << res << endl;
      |             ^~~
      |             rep
Language: C

#include<stdio.h>

int n;
int d[8][8];
int u[8];

int f(int now,int len){
  if(len == 1){
    return 1;
  }
  u[now] = 1;
  int ans = 0;
  for(int i = 0;i < n;i ++){
    if(u[i] == 0 && d[now][i] != 0){
      ans += f(i,len-1);
    }
    u[now] = 0;
    return 0;
  }
  
int main(void){
  int m;
  scanf("%d %d",&n,&m);
  
  for(int i = 0;i < m;i ++){
    int a , b;
    scanf("%d %d",&a,&b);
    d[a-1][b-1] = 1;
    d[b-1][a-1] = 1;
  }
  
  int ans = f(0,n);
  printf("%d\n",ans);
  
  return 0;
}

Compiler output:
main.c: In function 'f':
main.c:36:1: error: expected declaration or statement at end of input
   36 | }
      | ^
Language: C++

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

Compiler output:
a.cc:35:2: error: expected declaration before '}' token
   35 | }}
      |  ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:38: error: expected ';' before 'true'
   14 |     adj.at(a).at(b) = adj.at(a).at(b)  true;
      |                                      ^ ~~~~
      |                                      ;
a.cc: At global scope:
a.cc:35:2: error: expected declaration before '}' token
   35 | }}
      |  ^
Language: C++

#incliude<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin >> n >> m;
  
  vector<vector<bool>> adj(n,vector<bool>(n,false));
  vector<int> v(n);
  
  for ( int i = 0; i < m; i++){
    int a,b;
    cin >> a >> b;
    a--; b--;
    adj.at(a).at(b) = adj.at(a).at(b)  true;
  }
  
  for ( int i = 0; i < n; i++){
    v[i] = i;
  }
  
  int ans = 0;

  do{
      bool ok = true;
    for(int i = 1; i < n ; i++){
      if ( adj.at(v.at(i-1)).at(v.at(i)) == false){
        ok = false;
        break;
      }
    }
    if ( ok ) ans++;
  } while ( next_permutation(++v.begin(),v.end()));
  
  cout  << ans << endl;
}}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incliude; did you mean #include?
    1 | #incliude<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n >> m;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incliude<bits/stdc++.h>
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<vector<bool>> adj(n,vector<bool>(n,false));
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #incliude<bits/stdc++.h>
a.cc:7:17: error: expected primary-expression before 'bool'
    7 |   vector<vector<bool>> adj(n,vector<bool>(n,false));
      |                 ^~~~
a.cc:8:10: error: expected primary-expression before 'int'
    8 |   vector<int> v(n);
      |          ^~~
a.cc:14:5: error: 'adj' was not declared in this scope
   14 |     adj.at(a).at(b) = adj.at(a).at(b)  true;
      |     ^~~
a.cc:18:5: error: 'v' was not declared in this scope
   18 |     v[i] = i;
      |     ^
a.cc:26:12: error: 'adj' was not declared in this scope
   26 |       if ( adj.at(v.at(i-1)).at(v.at(i)) == false){
      |            ^~~
a.cc:26:19: error: 'v' was not declared in this scope
   26 |       if ( adj.at(v.at(i-1)).at(v.at(i)) == false){
      |                   ^
a.cc:32:32: error: 'v' was not declared in this scope
   32 |   } while ( next_permutation(++v.begin(),v.end()));
      |                                ^
a.cc:32:13: error: 'next_permutation' was not declared in this scope
   32 |   } while ( next_permutation(++v.begin(),v.end()));
      |             ^~~~~~~~~~~~~~~~
a.cc:34:3: error: 'cout' was not declared in this scope
   34 |   cout  << ans << endl;
      |   ^~~~
a.cc:34:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:34:19: error: 'endl' was not declared in this scope
   34 |   cout  << ans << endl;
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incliude<bits/stdc++.h>
a.cc: At global scope:
a.cc:35:2: error: expected declaration before '}' token
   35 | }}
      |  ^
Language: C++

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


vector<bool> seen;//訪れたか否か
int count1 = 1;//今まで幾つの頂点に訪れたか

int DFS(vector<vector<int>> &G, int v, int N){  
  
  bool all_seen = true;//全て訪れたかの判定
  for(int i = 0; i < N; i++){
     if(!seen[i]){
       all_seen = false;
     }
  }
  
  bool all_seen = true;//全て訪れたかの判定
  

  
  if(all_seen){
    return 1;
    //全て訪れたなら１を返す
  }
  
  int ans = 0;
  //vから行ける場所に行く
  for(int next_v: G[v]){
    if(seen[next_v]) continue;//既に訪れているなら別の頂点へ
    
    seen[next_v] = true;//頂点vは訪れた
    ans += DFS(G, next_v, N);
    seen[next_v] = false;//頂点vに訪れたことをリセット
  }
 
  return ans;
}
 
  

int main(){
  int N, M;
  cin >> N >> M;
  
 //グラフの受け取り
  vector<vector<int>> G(N);
  for(int i = 0; i < M; i++){
    int a, b;
    cin >> a >> b;
    G[a-1].push_back(b-1);
    G[b-1].push_back(a-1);
  }
  
  seen.assign(N, false);
  seen[0] = true;
  cout << DFS(G, 0, N) << endl;
}
  

Compiler output:
a.cc: In function 'int DFS(std::vector<std::vector<int> >&, int, int)':
a.cc:17:8: error: redeclaration of 'bool all_seen'
   17 |   bool all_seen = true;//全て訪れたかの判定
      |        ^~~~~~~~
a.cc:10:8: note: 'bool all_seen' previously declared here
   10 |   bool all_seen = true;//全て訪れたかの判定
      |        ^~~~~~~~
Language: C++

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


vector<bool> seen;//訪れたか否か
int count = 1;//今まで幾つの頂点に訪れたか
int ans = 0;
int DFS(vector<vector<int>> &G, int v, int N){  
  
  seen[v] = true;//頂点vは訪れた
  
  if(count == N) ans++;
  
  //vから行ける場所に行く
  for(int next_v: G[v]){
    
    //すでに訪れているなら無視
    if(seen[next_v]){
      continue;
    }
    count++;
    DFS(G, next_v, N);
  }
  
  return ans;
}
 
  

int main(){
  int N, M;
  cin >> N >> M;
  
 //グラフの受け取り
  vector<vector<int>> G(N);
  for(int i = 0; i < M; i++){
    int a, b;
    cin >> a >> b;
    G[a-1].push_back(b-1);
    G[b-1].push_back(a-1);
  }
  
  cout << DFS(G, O, N) << endl;
}
  
  

Compiler output:
a.cc: In function 'int DFS(std::vector<std::vector<int> >&, int, int)':
a.cc:12:6: error: reference to 'count' is ambiguous
   12 |   if(count == N) ans++;
      |      ^~~~~
In file included from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:6:5: note:                 'int count'
    6 | int count = 1;//今まで幾つの頂点に訪れたか
      |     ^~~~~
a.cc:21:5: error: reference to 'count' is ambiguous
   21 |     count++;
      |     ^~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:101:1: note: candidates are: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, typename std::iterator_traits<_II>::difference_type> std::count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  101 | count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~
/usr/include/c++/14/bits/stl_algo.h:4025:5: note:                 'template<class _IIter, class _Tp> typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)'
 4025 |     count(_InputIterator __first, _InputIterator __last, const _Tp& __value)
      |     ^~~~~
a.cc:6:5: note:                 'int count'
    6 | int count = 1;//今まで幾つの頂点に訪れたか
      |     ^~~~~
a.cc: In function 'int main()':
a.cc:43:18: error: 'O' was not declared in this scope
   43 |   cout << DFS(G, O, N) << endl;
      |                  ^
Language: C++

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

int N,M;
Graph graph(N);
vector<bool> seen;
int res = 0;

void do_dfs(int root,int times)
{
    for(auto i: graph[root])
    {
        if(root == 1)
        {
            seen = vector<bool>(N + 1,false);
            seen[1] = true;
        }
        if(seen[i]) continue;
        seen[i] = true;
        do_dfs(i,times + 1);
    }
    if(times == N) res++;
}
void calc()
{
    cin >> N >> M;
    int i,a,b;
    graph.resize(N + 1);
    for(i = 1;i <= N;i++)
    {
        cin >> a >> b;
        graph[a].push_back(b);
        graph[b].push_back(a);
    }
    do_dfs(1,1);
    cout << res << '\n';
}


int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    calc();
}


Compiler output:
a.cc:5:1: error: 'Graph' does not name a type
    5 | Graph graph(N);
      | ^~~~~
a.cc: In function 'void do_dfs(int, int)':
a.cc:11:17: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   11 |     for(auto i: graph[root])
      |                 ^~~~~
      |                 isgraph
a.cc: In function 'void calc()':
a.cc:28:5: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   28 |     graph.resize(N + 1);
      |     ^~~~~
      |     isgraph
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
using namespace std;
#define MAX_N 105
#define MAX_M 11
#define PI 3.14159265359
#define rep(i,n) for(int i=0; i<n; ++i)
#define INF 1001001001

typedef pair<int, int> P;

int main() {
    int n, m;
    cin >> n >> m;
    int path[n+1][n+1];
    memset(path, 0, sizeof(path));

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

    int root[n];
    rep(i,n) root[i] = i;

    int ans = 0;
    do {
        bool flg = true;
        for (int i=0; i<n-1; ++i) {
            if (!path[root[i]][root[i+1]]) flg = false;
        }
        if (flg) ++ans;
    } while (next_permutation(root+1, root+n));

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: 'memset' was not declared in this scope
   22 |     memset(path, 0, sizeof(path));
      |     ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <set>
  +++ |+#include <cstring>
    9 | using namespace std;
a.cc:42:14: error: 'next_permutation' was not declared in this scope
   42 |     } while (next_permutation(root+1, root+n));
      |              ^~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include<limits.h>
#include<iomanip>
#define rep(i, n) for(int i = 0; i < n; i++)
#define REP(i, m, n) for(int i = m; i < n; i++)
#define ALL(v) v.begin(),v.end()
#define RALL(v) v.rbegin(),v.rend()
#define check(v) rep(i,v.size()) cout << v[i] << " ";\
cout << endl
#define INF 1e8
typedef long long ll;
using namespace std;
//オーバーフローに気をつけろよおおおおおお
//確認忘れるなよおおおおおお

int n, m, ans, node1, node2, x[9]={1};
vector<int> G(9);

void dfs(int p, int q){
    if(q==n) {
        ans++;
        return;
    }
    for(auto a : G[p]){
        if(!x[a]){
            x[a] = 1;
            dfs(a,q+1);
            x[a] = 0;
        }
    }
}
int main() {
    cin >> n >> m;
    rep(i,m){
        cin >> node1 >> node2;
        node1--; node2--;
        G[node1].push_back(node2);
        G[node2].push_back(node1);
    }
    dfs(0,1);
    cout << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'void dfs(int, int)':
a.cc:31:21: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
   31 |     for(auto a : G[p]){
      |                     ^
      |                     std::begin
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:114:37: note: 'std::begin' declared here
  114 |   template<typename _Tp> const _Tp* begin(const valarray<_Tp>&) noexcept;
      |                                     ^~~~~
a.cc:31:21: error: 'end' was not declared in this scope; did you mean 'std::end'?
   31 |     for(auto a : G[p]){
      |                     ^
      |                     std::end
/usr/include/c++/14/bits/range_access.h:116:37: note: 'std::end' declared here
  116 |   template<typename _Tp> const _Tp* end(const valarray<_Tp>&) noexcept;
      |                                     ^~~
a.cc: In function 'int main()':
a.cc:44:18: error: request for member 'push_back' in 'G.std::vector<int>::operator[](((std::vector<int>::size_type)node1))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   44 |         G[node1].push_back(node2);
      |                  ^~~~~~~~~
a.cc:45:18: error: request for member 'push_back' in 'G.std::vector<int>::operator[](((std::vector<int>::size_type)node2))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   45 |         G[node2].push_back(node1);
      |                  ^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()

int main(){
  int N, M;
  cin >> N >> M;
  vector<vector<bool>> G(N, vector<bool>(N, false));
  rep(i, M){
    int a, b;
    cin >> a >> b;
    G.at(a-1).at(b-1) = true;
    G.at(b-1).at(a-1) = true;
  }
  
  vector<int> vec(N);
  rep(i, N) vec.at(i) = i;
  int ans = 0;
  do { 
    bool flag = true;
    for(int i = 0; i < N - 1 ; i++){
      if (!G.at(vec.at(i)).at(vec.at(i+1))){
        flag = false;
        break;
      }
    }
    if(flag) ans++;
  } while (next_permutation(v.begin()+1, v.end()));
  cout << ans << endl;
}


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

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t

#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define BUF_SIZE 100

// size: specify sizeof(str)
int get_str(char *str, int size) {
    if(!fgets(str, size, stdin)) return -1;
    return 0;
}

int get_int(void) {
  int num;
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return 0;
  sscanf(line, "%d", &num);
#else
#error
#endif
  return num;
}

int get_int2(int *a1, int *a2) {
#ifdef BUF_SIZE
  char line[BUF_SIZE];
  if(!fgets(line, BUF_SIZE, stdin)) return -1;
  sscanf(line, "%d %d", a1, a2);
#else
#error
#endif
  return 0;
}

void swap(int *a, int *b) {
    int tmp = *a;
    *a = *b;
    *b = tmp;
}

void reversed(int *a, int size) {
    int *b = malloc(sizeof(int)*size);
    memcpy(b, a, sizeof(int)*size);
    int i;
    for(i = 0; i < size; i++) {
        a[i] = b[size-1-i];
    }
}

// in-place(C++ like function)
int next_permutation(int *arr, int size) {
    int i, k;
    if(!size || size==1) return 0;
    // step1. 
    for(k = size-2; k >= 0; k--) {
        if(arr[k+1] > arr[k]) break;
    }
    if(k < 0) {
        // reversed
        reversed(arr, size);
        return 0;
    }
    for(i = size-1; i >= 0; i--) {
        if(arr[i] < arr[k]) continue;
        break;
    }
    swap(&arr[i], &arr[k]);
    reversed(&arr[k+1], size-1-k);
    return 1;
}

#define VERTEXES_MAX 8

int main(void) {
    int vs, es;
    static char graph[VERTEXES_MAX][VERTEXES_MAX];
    get_int2(&vs, &es);
    int i;
    for(i = 0; i < es; i++) {
        int v1, v2;
        get_int2(&v1, &v2);
        // 1-indexed -> 0-indexed
        v1--; v2--;
        // undirected
        graph[v1][v2] = graph[v2][v1] = 1;
    }
    int arr[VERTEXES_MAX];
    for(i = 0; i < vs; i++) arr[i] = i;

    int cnt = 0;
    do {
        // starting point must be 0
        if(arr[0] != 0) break;
#ifdef DEBUG
        for(i = 0; i < vs; i++) printf("%d ", arr[i]);
        putchar('\n');
#endif
        int flag = 1;
        for(i = 1; i < vs; i++) {
            if(graph[arr[i-1]][arr[i]]) continue;
            flag = 0;
            break;
        }
        if(flag) cnt++;
    } while(next_permutation(arr, vs));

    printf("%d\n", cnt);
    return 0;
}

Compiler output:
a.cc: In function 'void reversed(int*, int)':
a.cc:46:20: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
   46 |     int *b = malloc(sizeof(int)*size);
      |              ~~~~~~^~~~~~~~~~~~~~~~~~
      |                    |
      |                    void*
Language: C++

#include <iostream>
#include <sstream>
#include <stack>
#include <iomanip>
#include <string>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <queue>
#include <cmath>

#define BEGIN(x) x.begin()
#define END(x) x.end()
#define ALL(x) BEGIN(x), END(x)
#define PAIR make_pair
#define VEC(type) vector<type >

#define FOR(i, A, B) for(auto i = (A);i != (B); i++)
#define FORD(i, A, B) for(auto i = (A);i != (B); i--)

#define READRANGE(begin, end) FOR(it, begin, end) cin >> *it
#define READVEC(V) READRANGE(BEGIN(V), END(V))

using namespace std;

typedef long long lint;
typedef pair<int, int> Pii;
typedef pair<int, lint> Pil;
typedef pair<lint, lint> Pll;
typedef pair<lint, int> Pli;

// ---- BEGIN LIBRARY CODE ----
// ---- END LIBRARY CODE ----
void io_init()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
};

int dp[1 << 8][8];

int f(int mask, int last, VEC(VEC(int))& edges)
{
    const int n = edges.size();
    if (mask == (1 << n) - 1)
        return 1;

    int& ans = dp[mask][last];
    if (ans >= 0)
        return ans;

    ans = 0;
    for(int next : edges[last])
        if (!(mask & (1 << next)))
            ans += f(mask | (1 << next), next, edges);
    return ans;
}

int main(int argc, char **argv)
{
    io_init();

    // Actual program code starts here.
    int N, M;
    cin >> N >> M;
    VEC(VEC(int)) edges(N);
    FOR(i, 0, M) {
        int a, b;
        cin >> a >> b;
        a--;b--;
        edges[a].push_back(b);
        edges[b].push_back(a);
    }

    memset(dp, -1, sizeof dp);
    cout << f(1, 0, edges) << endl;
    return 0;
};


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:79:5: error: 'memset' was not declared in this scope
   79 |     memset(dp, -1, sizeof dp);
      |     ^~~~~~
a.cc:15:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   14 | #include <cmath>
  +++ |+#include <cstring>
   15 |
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
bool G[10][10];

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;
    }
    vector<int> ord(n);
    rep(i,n) 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:8:5: error: 'cin' does not name a type
    8 |     cin >> n >> m;
      |     ^~~
a.cc:2:18: error: expected unqualified-id before 'for'
    2 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                  ^~~
a.cc:9:5: note: in expansion of macro 'rep'
    9 |     rep(i,m){
      |     ^~~
a.cc:9:9: error: 'i' does not name a type
    9 |     rep(i,m){
      |         ^
a.cc:2:32: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                                ^
a.cc:9:9: error: 'i' does not name a type
    9 |     rep(i,m){
      |         ^
a.cc:2:40: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                                        ^
a.cc:2:18: error: expected unqualified-id before 'for'
    2 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                  ^~~
a.cc:16:5: note: in expansion of macro 'rep'
   16 |     rep(i,n) ord[i] = i;
      |     ^~~
a.cc:16:9: error: 'i' does not name a type
   16 |     rep(i,n) ord[i] = i;
      |         ^
a.cc:2:32: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                                ^
a.cc:16:9: error: 'i' does not name a type
   16 |     rep(i,n) ord[i] = i;
      |         ^
a.cc:2:40: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i = 0;i < (n);i++)
      |                                        ^
a.cc:18:5: error: expected unqualified-id before 'do'
   18 |     do {
      |     ^~
a.cc:28:5: error: expected unqualified-id before 'while'
   28 |     while (next_permutation(ord.begin(),ord.end()));
      |     ^~~~~
a.cc:29:5: error: 'cout' does not name a type
   29 |     cout << res << endl;
      |     ^~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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

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

int DFS(int v, int N, bool has_visited[nmax]) {
  bool has_visited_all = true;
  for (int i = 0; i < N; i++) {
    if (!has_visited[i]) has_visited_all = false;
  }

  if (has_visited_all) {
    return 1;
  }

  int ret = 0;
  for (int i = 0; i < N; i++) {
    if (!G[v][i]) continue;
    if (has_visited[v]) continue;
    has_visited[v] = true;
    ret += dfs(i, N, has_visited);
    has_visited[i] = false;
  }
  return true;
}

int main() {
  int N, M; cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int A, B; cin >> A >> B;
    G[A-1][B-1] = G[B-1][A-1] = true;
  }
  bool has_visited[nmax];
  for (int i = 0; i < N; i++) has_visited[i] = false;
  cout << DFS(0, N. has_visited) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int DFS(int, int, bool*)':
a.cc:22:12: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   22 |     ret += dfs(i, N, has_visited);
      |            ^~~
      |            ffs
a.cc: In function 'int main()':
a.cc:36:21: error: request for member 'has_visited' in 'N', which is of non-class type 'int'
   36 |   cout << DFS(0, N. has_visited) << endl;
      |                     ^~~~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int N, M;
bool G[8][8] = {};

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

    // 全順列を生成
    int linked_count = 0;
    int p[8] = {0, 1, 2, 3, 4, 5, 6, 7};
    do {
        bool is_linked = true;
        // N = 1のとき i は [0, 0]
        // N = 2のとき i は [0, 0]
        // N = 3のとき i は [0, 1]
        // iは始点となるノード番号-1
        for(int i = 0; i < N-1 && is_linked; ++i) {
            is_linked = G[p[i]][p[i+1]];
        }

        if(is_linked) ++linked_count;
    } while(next_permutation(p + 1, p + N)); // N = 3のとき [p+1, p+2] = [p+1, p+3)

    cout << linked_count << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: 'next_permutation' was not declared in this scope
   29 |     } while(next_permutation(p + 1, p + N)); // N = 3のとき [p+1, p+2] = [p+1, p+3)
      |             ^~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep2(i, a, n) for(ll i = a; i < (ll)(n); i++)
#define memi cout << endl
#define kono(n) cout << fixed << setprecision(n)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define hina cout << ' '
#define in(n) cin >> n
#define in2(n, m) cin >> n >> m
#define in3(n, m, l) cin >> n >> m >> l
#define out(n) cout << n
const ll mei = (ll)1e9 + 7;

int main(){
  ll n, m, a, s, t;
  in2(n, m);
  a = 0;
  vector<ll> c(n - 1);
  rep(i, n)
    c[i] = i + 1;
  vector<vector<ll>> d(n, vector<ll>);
  bool h;
  rep(i, m){
    in2(s, t);
    d[s - 1].pb(t - 1);
    d[t - 1].pb(s - 1);
  }
  do{
    h = true;
    rep(i, d[0].size()){
      if(c[0] == d[0][i])
        break;
      if(i == d[0].size() - 1)
        h = false;
    }
    rep(i, n - 1){
      rep(j, d[c[i]].size()){
        if(c[i + 1] == d[c[i]][j])
          break;
        if(j == d[c[i]].size() - 1)
          h = false;
      }
    }
    if(h)
      a++;
  }while(next_permutation(all(c)));
  out(a);
  memi;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:37: error: expected primary-expression before ')' token
   24 |   vector<vector<ll>> d(n, vector<ll>);
      |                                     ^
Language: C++

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

int find_num(int n, int k, vector<int> &inp) {
    set<int> num;
    if (k=2) {
        for (int i=0; i<n; i++) {
            for (int j=0; j<n; j++) {
                if (i!=j){
                    num.insert(stoi(to_string(inp.at(i))+to_string(inp.at(j))));
                }
            }
        }
    }
    else if (k=3) {
        for (int i=0; i<n; i++) {
            for (int j=0; j<n; j++) {
                for (int k=0; k<n; k++) {
                    if (i!=j && j!=k && k!=i) {
                        num.insert(stoi(to_string(inp.at(i))+to_string(inp.at(j))+to_string(inp.at(k))));
                    }
                }
            }
        }
    }
    else {
        for (int i=0; i<n; i++) {
            for (int j=0; j<n; j++) {
                if (i!=j) {
                    for (int k=0; k<n; k++) {
                        if (i!=k && j!=k) {
                            for (int l=0; l<n; l++) {
                                if (i!=l && j!=l && k!=l) {
                                    num.insert(stoi(to_string(inp.at(i))+to_string(inp.at(j))+to_string(inp.at(k))+to_string(inp.at(l))));
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return set.size();
}

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> inp(n);
    for (int i=0; i<n; i++) {
        cin >> inp.at(i);
    }
    cout << find_num(n, k, inp) << endl;
}

Compiler output:
a.cc: In function 'int find_num(int, int, std::__debug::vector<int>&)':
a.cc:44:15: error: missing template arguments before '.' token
   44 |     return set.size();
      |               ^
Language: C++

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

int find_num(int n, int k, vector<int> &inp) {
    set<int> num;
    if (k=2) {
        for (int i=0; i<n; i++) {
            for (int j=0; j<n; j++) {
                if (i!=j){
                    num.insert(stoi(to_string(inp.at(i))+to_string(inp.at(j))));
                }
            }
        }
    }
    else if (k=3) {
        for (int i=0; i<n; i++) {
            for (int j=0; j<n; j++) {
                for (int k=0; k<n; k++) {
                    if (i!=j && j!=k && k!=i) {
                        num.insert(stoi(to_string(inp.at(i))+to_string(inp.at(j))+to_string(inp.at(k))));
                    }
                }
            }
        }
    }
    else {
        for (int i=0; i<n; i++) {
            for (int j=0; j<n; j++) {
                if (i!=j) {
                    for (int k=0; k<n; k++) {
                        if (i!=k && j!=k) {
                            for (int l=0; l<n; l++) {
                                if (i!=l && j!=l && k!=l) {
                                    num.insert(stoi(to_string(inp.at(i))+to_string(inp.at(j))+to_string(inp.at(k))+to_string(inp.at(l))));
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return set.size();
}

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> inp(n);
    for (int i=0; i<n; i++) {
        cin >> inp(i);
    }
    cout << find_num(n, k, &inp) << endl;
}

Compiler output:
a.cc: In function 'int find_num(int, int, std::__debug::vector<int>&)':
a.cc:44:15: error: missing template arguments before '.' token
   44 |     return set.size();
      |               ^
a.cc: In function 'int main()':
a.cc:52:19: error: no match for call to '(std::__debug::vector<int>) (int&)'
   52 |         cin >> inp(i);
      |                ~~~^~~
a.cc:54:28: error: invalid initialization of non-const reference of type 'std::__debug::vector<int>&' from an rvalue of type 'std::__debug::vector<int>*'
   54 |     cout << find_num(n, k, &inp) << endl;
      |                            ^~~~
a.cc:5:41: note: in passing argument 3 of 'int find_num(int, int, std::__debug::vector<int>&)'
    5 | int find_num(int n, int k, vector<int> &inp) {
      |                            ~~~~~~~~~~~~~^~~
Language: C++

#define _DEBUG 1
#define _GLIBCXX_DEBUG

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

using ll = long long;

#ifdef _DEBUG
#define dump(x) cerr << #x << "=" << x << endl
#define dump2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define dump3(x, y, z)                                                         \
  cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z     \
       << endl
#define check(s) cerr << s << endl
#else
#define dump(x)
#define dump2(x, y)
#define dump3(x, y, z)
#define check(s)
#endif

#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define unique(v) v.erase(unique(v.begin(), v.end()), v.end());

void solve(ll N, ll M, std::vector<ll> a, std::vector<ll> b) {
  vector<ll> e(N);
  for (int i = 0; i < N; i++) {
    e.at(i) = i;
  }

  ll count = 0;

  do {
    if (e.at(0) == 0) {
      bool result = true;
      rep(i, N - 1) {
        bool found = false;
        rep(j, M) {
          if ((e.at(i) == a.at(j) && e.at(i + 1) == b.at(j)) ||
              (e.at(i + 1) == a.at(j) && e.at(i) == b.at(j))) {
            found = true;
            break;
          }
        }
        result = result && found;
        if (!result)
          break;
      }

      if (result)
        count++;
    }
  } while (next_permutation(all(e)));
ub
  cout << count << endl;
}

int main() {
  ll N;
  scanf("%lld", &N);
  ll M;
  scanf("%lld", &M);
  std::vector<ll> a(M);
  std::vector<ll> b(M);
  for (int i = 0; i < M; i++) {
    scanf("%lld", &a[i]);
    scanf("%lld", &b[i]);
    a[i]--;
    b[i]--;
  }
  solve(N, M, std::move(a), std::move(b));
  return 0;
}


Compiler output:
a.cc: In function 'void solve(ll, ll, std::__debug::vector<long long int>, std::__debug::vector<long long int>)':
a.cc:57:1: error: 'ub' was not declared in this scope; did you mean 'b'?
   57 | ub
      | ^~
      | b
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
typedef struct element{
    int a,b;
}element;
int path(element *a,int i,int pivot){
    
}
int main(void){
    int numvertex,numedge;
    int i,j=0;
    int count=0;
    int pivot;
    int *trait;
    element *edge;

    scanf("%d %d",&numvertex,&numedge);
    edge=(element *)malloc(sizeof(element)*numedge);
    trait=(int *)malloc(sizeof(int)*numvertex);
    for(i=0;i<numvertex;i++){
        trait[i]=0;
    }
    for(i=0;i<numedge;i++){
        scanf("%d %d",&edge[i].a,&edge[i].b);
    }
    for(i=0;i<numedge;i++){
        if(edge[i].a==1){
            pivot=edge[i].b;
            printf("1%d",pivot);
            while(j<numedge){
                if(j!=i){
                    if()
                }
            }
        }
    }
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:34:24: error: expected expression before ')' token
   34 |                     if()
      |                        ^
Language: C++

#include<iostream>
#include<vector>

using namespace std;

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

int per[8];
vector<int> g[8];
int n;
int m;

bool ispath(int x){
    if(x == 0){
        if(per[x] != 0){
            return false;
        }
    }
    // cout << x << endl;
    if (x == n - 1){
        return true;
    }
    for (int i = 0; i < g[per[x]].size(); i++){
        if (g[per[x]][i] == per[x+1]){
            return ispath(x + 1);
        }
    }
    return false;
}

int main(){
    cin >> n >> m;
    int a, b;
    rep(i, m){
        cin >> a >> b;
        a--; b--;
        g[a].push_back(b);
        g[b].push_back(a);
    }
    rep(i, n) per[i] = i;
    int ans = 0;
    do{

        // rep(i, n) cout << per[i];
        // cout << endl;
        if (ispath(0)){
            ans++;
        }
    }while(next_permutation(per, per + n));
    cout << ans << endl;
    
}

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

#include<iostream>
using namespace std;

int dfs(bool** graph, int v, bool *visited, int N) {
  visited[v] = true;
  
  bool visit_a_vertex = false;
  bool all_visited = true;
  int ret = 0;
  
  for(int i = 0; i < N; i++) {
    
    
    if(graph[v][i] && !visited[i]) {
       visit_a_vertex = true; 
       ret += dfs(graph,i,visited,N);
    }
    if(i != v && !visited[i]){
       all_visited = false; 
    }
  }
   visited[v] = false; 
  if(!visit_a_vertex && all_visited){
     return ret+1;
  }
  return ret;
}

int main() {
  
  int N,M;
  cin >> N >> M;
  bool **graph = new bool[N];
  bool *visited = new bool[N];
  
  for(int i = 0; i < N; i++) {
    graph[i] = new bool[N];
  	visited[i] = false;
  }
    
  for(int i = 0 ; i < M  ;i++) {
    unsigned s,t;
    cin >> s >> t;
    graph[s][t] = true; 
    graph[t][s] = true;
  }
  
  for(int i = 0;i < N; i++)
  
  
  return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:28: error: cannot convert 'bool*' to 'bool**' in initialization
   33 |   bool **graph = new bool[N];
      |                            ^
      |                            |
      |                            bool*