foo.cc:7:13: error: 'int time [310]' redeclared as different kind of symbol
int time[310];
^
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 'int main()':
foo.cc:13:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
scanf("%d%d%d",&rmb[i],&rp[i],&time[i]);
^
foo.cc:13:39: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' [-Wformat=]
scanf("%d%d%d",&rmb[i],&rp[i],&time[i]);
~~~~~~~~^
foo.cc:21:116: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(MM[j][k][1]<MM[j-rmb[i]][k-rp[i]][1]+1||MM[j][k][1]==MM[j-rmb[i]][k-rp[i]][1]+1&&MM[j-rmb[i]][k-rp[i]][2]+time[i]<MM[j][k][2])
^
foo.cc:21:109: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if(MM[j][k][1]<MM[j-rmb[i]][k-rp[i]][1]+1||MM[j][k][1]==MM[j-rmb[i]][k-rp[i]][1]+1&&MM[j-rmb[i]][k-rp[i]][2]+time[i]<MM[j][k][2])
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.cc:21:128: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if(MM[j][k][1]<MM[j-rmb[i]][k-rp[i]][1]+1||MM[j][k][1]==MM[j-rmb[i]][k-rp[i]][1]+1&&MM[j-rmb[i]][k-rp[i]][2]+time[i]<MM[j][k][2])
^
foo.cc:21:83: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if(MM[j][k][1]<MM[j-rmb[i]][k-rp[i]][1]+1||MM[j][k][1]==MM[j-rmb[i]][k-rp[i]][1]+1&&MM[j-rmb[i]][k-rp[i]][2]+time[i]<MM[j][k][2])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:24:44: warning: pointer to a function used in arithmetic [-Wpointer-arith]
MM[j][k][2]=MM[j-rmb[i]][k-rp[i]][2]+time[i];
^
foo.cc:24:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
MM[j][k][2]=MM[j-rmb[i]][k-rp[i]][2]+time[i];
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
foo.cc:24:37: error: invalid conversion from 'time_t (*)(time_t*) throw () {aka long int (*)(long int*) throw ()}' to 'int' [-fpermissive]
foo.cc:11:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:13:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&rmb[i],&rp[i],&time[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:15:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&r,&p);
~~~~~^~~~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。