/in/foo.cc:3:15: error: 'int time' redeclared as different kind of symbol
int k[500001],time=0,n;
^~~~
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 tree(int, int, int)':
/in/foo.cc:9:57: warning: ISO C++ forbids incrementing a pointer of type 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' [-Wpointer-arith]
tree(now,+k[now],target),tree(now,-k[now],target),time++;
^~
/in/foo.cc:9:57: error: lvalue required as increment operand
/in/foo.cc: In function 'int main()':
/in/foo.cc:18:8: warning: the address of 'time_t time(time_t*)' will always evaluate as 'true' [-Waddress]
cout<<time;
^~~~