foo.cc:4:16: error: 'int time [21]' redeclared as different kind of symbol
int a[N],time[N],ans=0x7f7f7f7f;
^
In file included from /usr/include/pthread.h:24:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:35,
from /usr/include/x86_64-linux-gnu/c++/7/bits/gthr.h:148,
from /usr/include/c++/7/ext/atomicity.h:35,
from /usr/include/c++/7/bits/ios_base.h:39,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from foo.cc:1:
/usr/include/time.h:75:15: note: previous declaration 'time_t time(time_t*)'
extern time_t time (time_t *__timer) __THROW;
^~~~
foo.cc: In function 'void sb(int)':
foo.cc:13:15: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(y<time[i])
^
foo.cc:13:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
foo.cc:15:13: warning: pointer to a function used in arithmetic [-Wpointer-arith]
y=time[i];
^
foo.cc:15:13: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]
y=time[i];
~~~~~~^
foo.cc:26:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[i]+=a[x];
^
foo.cc:26:10: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[i]+=a[x];
~~~~~~~^~~~~~
foo.cc:26:15: error: assignment of read-only location '*(time + ((sizetype)i))'
time[i]+=a[x];
^
foo.cc:26:15: error: cannot convert 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment
foo.cc:28:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[i]-=a[x];
^
foo.cc:28:10: warning: pointer to a function used in arithmetic [-Wpointer-arith]
time[i]-=a[x];
~~~~~~~^~~~~~
foo.cc:28:15: error: assignment of read-only location '*(time + ((sizetype)i))'
time[i]-=a[x];
^
foo.cc:28:15: error: cannot convert 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'time_t(time_t*) throw () {aka long int(long int*) throw ()}' in assignment
[Hydro](https://hydro.ac)提供评测服务