/in/foo.cc: In function 'void dfs(int, int)':
/in/foo.cc:15:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<a[rt].size();i++)
~^~~~~~~~~~~~~
/in/foo.cc: At global scope:
/in/foo.cc:23:14: error: 'int time [300010]' redeclared as different kind of symbol
int time[maxn],num[maxn];
^
In file included from /usr/include/pthread.h:24:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/6/bits/gthr.h:148,
from /usr/include/c++/6/ext/atomicity.h:35,
from /usr/include/c++/6/bits/ios_base.h:39,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /usr/include/c++/6/iostream:39,
from /in/foo.cc:1:
/usr/include/time.h:192:15: note: previous declaration 'time_t time(time_t*)'
extern time_t time (time_t *__timer) __THROW;
^~~~
/in/foo.cc: In function 'void solve(int, int)':
/in/foo.cc:38:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(deep[mx]-deep[x]==time[x])
^
/in/foo.cc:38:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:44:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(sum-(deep[my]-deep[y])==time[y])
^
/in/foo.cc:44:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:50:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(deep[mx]-deep[x]==time[x])
^
/in/foo.cc:50:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:53:36: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(sum-(deep[my]-deep[y])==time[y])
^
/in/foo.cc:53:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc:57:29: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(deep[mx]-deep[x]==time[x])
^
/in/foo.cc:57:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
/in/foo.cc: In function 'int main()':
/in/foo.cc:72:20: warning: pointer to a function used in arithmetic [-Wpointer-arith]
scanf("%d",&time[i]);
^
/in/foo.cc:72:21: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' [-Wformat=]
scanf("%d",&time[i]);
^