Language: C++

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <stack>
using namespace std;
stack<int> st;
int  v[102][101], n;
int  time[102][2];
int ct = 1;
inline void search(int t) {
	if(!time[t][0]) time[t][0] = ct++;
	int tf = 0;
	for (int a = 1; a <= n; a++) {
		if (v[t][a]) {
			st.push(a);
			for (int i = 1; i <= n; i++) {
				v[i][a] = 0;
			}
			search(st.top());
			tf = 1;
		}
	}
		
	if(!tf) {
		st.pop();
		time[t][1] = ct++;
		if(!st.empty()) search(st.top());
	}
}
int main() {
	st.push(1);
	int u, k, s;
	cin >> n;
	for (int i = 0; i <= n; i++) {
		for (int j = 0; j <= n; j++) {
			v[i][j] = 0;
		}
	}
	for (int i = 0; i < n; i++) {
		cin >> u;
		cin >> k;
		for (int j = 0; j < k; j++) {
			cin >> s;
			v[u][s] = 1;
		}
	}
	search(1);
	for (int i = 1; i <= n; i++) {
		cout << i << " " << time[i][0] << " " << time[i][1] << endl;
	}
	return 0;
}

Compiler output:
a.cc:9:17: error: 'int time [102][2]' redeclared as different kind of entity
    9 | int  time[102][2];
      |                 ^
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:3:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'void search(int)':
a.cc:12:19: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   12 |         if(!time[t][0]) time[t][0] = ct++;
      |                   ^
a.cc:12:22: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   12 |         if(!time[t][0]) time[t][0] = ct++;
      |                      ^
a.cc:12:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   12 |         if(!time[t][0]) time[t][0] = ct++;
      |                               ^
a.cc:12:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   12 |         if(!time[t][0]) time[t][0] = ct++;
      |                                  ^
a.cc:12:36: error: assignment of read-only location '*(time + ((sizetype)t))'
   12 |         if(!time[t][0]) time[t][0] = ct++;
      |                         ~~~~~~~~~~~^~~~~~
a.cc:27:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   27 |                 time[t][1] = ct++;
      |                       ^
a.cc:27:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   27 |                 time[t][1] = ct++;
      |                          ^
a.cc:27:28: error: assignment of read-only location '*(time + (((sizetype)t) + 1))'
   27 |                 time[t][1] = ct++;
      |                 ~~~~~~~~~~~^~~~~~
a.cc: In function 'int main()':
a.cc:50:43: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   50 |                 cout << i << " " << time[i][0] << " " << time[i][1] << endl;
      |                                           ^
a.cc:50:46: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   50 |                 cout << i << " " << time[i][0] << " " << time[i][1] << endl;
      |                                              ^
a.cc:50:64: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   50 |                 cout << i << " " << time[i][0] << " " << time[i][1] << endl;
      |                                                                ^
a.cc:50:67: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   50 |                 cout << i << " " << time[i][0] << " " << time[i][1] << endl;
      |                                                                   ^