foo.cc: In function 'int main()':
foo.cc:11:14: warning: unused variable 'j' [-Wunused-variable]
int n,m,t,i,j,sumtime,ttrack,rest;
^
foo.cc:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&n,&m,&t);
~~~~~^~~~~~~~~~~~~~~~~~~
foo.cc:17:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~
foo.cc:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&p[i]);
~~~~~^~~~~~~~~~~~