Language: C++

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

int N,M;
int main(int now , int depth) {
	if (used[now]) return 0;
	if (depth == N) return 1;
	used[now] = 1;
	int ans = 0;
	for (int i = 0; i < N ; i++){
		if(connect[now][i]) ans += dfs (i, depth  + 1);
	}
	used[now] = 0;
	return ans;
}

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

Compiler output:
a.cc:3:1: error: 'vector' does not name a type
    3 | vector used;
      | ^~~~~~
a.cc:4:1: error: 'vector' does not name a type
    4 | vector connect;
      | ^~~~~~
a.cc:7:5: warning: second argument of 'int main(int, int)' should be 'char **' [-Wmain]
    7 | int main(int now , int depth) {
      |     ^~~~
a.cc: In function 'int main(int, int)':
a.cc:8:13: error: 'used' was not declared in this scope
    8 |         if (used[now]) return 0;
      |             ^~~~
a.cc:10:9: error: 'used' was not declared in this scope
   10 |         used[now] = 1;
      |         ^~~~
a.cc:13:20: error: 'connect' was not declared in this scope; did you mean 'const'?
   13 |                 if(connect[now][i]) ans += dfs (i, depth  + 1);
      |                    ^~~~~~~
      |                    const
a.cc:13:44: error: 'dfs' was not declared in this scope
   13 |                 if(connect[now][i]) ans += dfs (i, depth  + 1);
      |                                            ^~~
a.cc: At global scope:
a.cc:19:5: error: conflicting declaration of C function 'int main()'
   19 | int main(){
      |     ^~~~
a.cc:7:5: note: previous declaration 'int main(int, int)'
    7 | int main(int now , int depth) {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:21:9: error: 'vector' was not declared in this scope
   21 |         vector a(M), b(M);
      |         ^~~~~~
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:23:24: error: 'a' was not declared in this scope
   23 |                 cin >> a[i] >> b[i];
      |                        ^
a.cc:23:32: error: 'b' was not declared in this scope
   23 |                 cin >> a[i] >> b[i];
      |                                ^
a.cc:26:9: error: 'used' was not declared in this scope
   26 |         used = vector(N, 0);
      |         ^~~~
a.cc:27:9: error: 'connect' was not declared in this scope; did you mean 'const'?
   27 |         connect = vector(N, vector(N, 0));
      |         ^~~~~~~
      |         const
a.cc:30:25: error: 'a' was not declared in this scope
   30 |                 connect[a[i]b[i]] = connect[b[i]a[i]] = 1;
      |                         ^
a.cc:30:29: error: expected ']' before 'b'
   30 |                 connect[a[i]b[i]] = connect[b[i]a[i]] = 1;
      |                             ^
      |                             ]
a.cc:32:17: error: 'dfs' was not declared in this scope
   32 |         cout << dfs (0,1)
      |                 ^~~