Language: C++

#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() {
	for (int i = 1; i <= n; i++) {
		time[i][0] = 0;
	}
	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:7:17: error: 'int time [102][2]' redeclared as different kind of entity
    7 | 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:1:
/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:10:19: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   10 |         if(!time[t][0]) time[t][0] = ct++;
      |                   ^
a.cc:10:22: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   10 |         if(!time[t][0]) time[t][0] = ct++;
      |                      ^
a.cc:10:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   10 |         if(!time[t][0]) time[t][0] = ct++;
      |                               ^
a.cc:10:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   10 |         if(!time[t][0]) time[t][0] = ct++;
      |                                  ^
a.cc:10:36: error: assignment of read-only location '*(time + ((sizetype)t))'
   10 |         if(!time[t][0]) time[t][0] = ct++;
      |                         ~~~~~~~~~~~^~~~~~
a.cc:25:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   25 |                 time[t][1] = ct++;
      |                       ^
a.cc:25:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   25 |                 time[t][1] = ct++;
      |                          ^
a.cc:25:28: error: assignment of read-only location '*(time + (((sizetype)t) + 1))'
   25 |                 time[t][1] = ct++;
      |                 ~~~~~~~~~~~^~~~~~
a.cc: In function 'int main()':
a.cc:31:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   31 |                 time[i][0] = 0;
      |                       ^
a.cc:31:26: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   31 |                 time[i][0] = 0;
      |                          ^
a.cc:31:28: error: assignment of read-only location '*(time + ((sizetype)i))'
   31 |                 time[i][0] = 0;
      |                 ~~~~~~~~~~~^~~
a.cc:51:43: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   51 |                 cout << i << " " << time[i][0] << " " << time[i][1] << endl;
      |                                           ^
a.cc:51:46: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   51 |                 cout << i << " " << time[i][0] << " " << time[i][1] << endl;
      |                                              ^
a.cc:51:64: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   51 |                 cout << i << " " << time[i][0] << " " << time[i][1] << endl;
      |                                                                ^
a.cc:51:67: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   51 |                 cout << i << " " << time[i][0] << " " << time[i][1] << endl;
      |                                                                   ^