Main.cc:9:7: error: ‘int time’ redeclared as different kind of symbol int n,time,s[maxn],a[20][maxn],cnt,order[maxn]; ^~~~ 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 Main.cc:1: /usr/include/time.h:75:15: note: previous declaration ‘time_t time(time_t*)’ extern time_t time (time_t *__timer) __THROW; ^~~~ Main.cc: In function ‘int main()’: Main.cc:13:26: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}’ [-Wformat=] scanf("%d%d",&n,&time); ~~~~~^ Main.cc:33:45: error: invalid operands of types ‘time_t(time_t*) throw () {aka long int(long int*) throw ()}’ and ‘int’ to binary ‘operator%’ if((i+j+k+l)%2==time%2 && i+j+k+l<=time) ~~~~^~ Main.cc:33:60: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if((i+j+k+l)%2==time%2 && i+j+k+l<=time) ^~~~ Main.cc:13:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&n,&time); ~~~~~^~~~~~~~~~~~~~~~~ Main.cc:18:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&tmp); ~~~~~^~~~~~~~~~~ Main.cc:24:14: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&tmp); ~~~~~^~~~~~~~~~~