foo.cc: In function 'int main()':
foo.cc:17:6: warning: statement has no effect [-Wunused-value]
for(i;i<n;i++)
^
foo.cc:10:41: warning: variable 'num' set but not used [-Wunused-but-set-variable]
int t,i=0,k,j,n,n1,n2,max,min,last,min2,num;
^~~
foo.cc:12:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&t);
~~~~~^~~~~~~~~
foo.cc:16:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
foo.cc:19:6: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a[i]);
~~~~~^~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务