Language: C++

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

#define MAX_V  8

vector<int> G[ MAX_V ] ;
bool visited[ MAX_V ] ;
int nt[ MAX_V ] ;
int cnt = 0;
int res = 0;

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

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

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

int main(){
    int V,E;
    scanf("%d %d",  &V, &E);
    for(int i =0; i < E; i++){
        int s,t;
        scanf("%d %d", &s, &t);
        G[s].push_back(t);
        G[t].push_back(s);
    }
    fill(nt,nt + V,0);
    fill(visited, visited + V, false);
    dfs();
    pr#include <bits/stdc++.h>
#define ll long long
using namespace std;

#define MAX_V  8

vector<int> G[ MAX_V ] ;
bool visited[ MAX_V ] ;
int nt[ MAX_V ] ;
int cnt = 0;
int res = 0;

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

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

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

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


Compiler output:
a.cc:58:7: error: stray '#' in program
   58 |     pr#include <bits/stdc++.h>
      |       ^
a.cc: In function 'int dfs()':
a.cc:31:19: error: 'V' was not declared in this scope
   31 |         if(cnt == V)res++;
      |                   ^
a.cc:44:1: warning: no return statement in function returning non-void [-Wreturn-type]
   44 | }
      | ^
a.cc: In function 'int main()':
a.cc:58:5: error: 'pr' was not declared in this scope
   58 |     pr#include <bits/stdc++.h>
      |     ^~
a.cc:70:16: error: a function-definition is not allowed here before '{' token
   70 | int next(int u){
      |                ^
a.cc:81:8: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   81 | int dfs(){
      |        ^~
a.cc:81:8: note: remove parentheses to default-initialize a variable
   81 | int dfs(){
      |        ^~
      |        --
a.cc:81:8: note: or replace parentheses with braces to value-initialize a variable
a.cc:81:10: error: a function-definition is not allowed here before '{' token
   81 | int dfs(){
      |          ^
a.cc:103:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
  103 | int main(){
      |         ^~
a.cc:103:9: note: remove parentheses to default-initialize a variable
  103 | int main(){
      |         ^~
      |         --
a.cc:103:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:103:11: error: a function-definition is not allowed here before '{' token
  103 | int main(){
      |           ^
a.cc:117:1: error: 'intf' was not declared in this scope; did you mean 'rintf'?
  117 | intf("%d¥n", res);
      | ^~~~
      | rintf