foo.cc: In function 'int main()':
foo.cc:4:30: warning: unused variable 'h' [-Wunused-variable]
int head1,back2,i,n,k,j,h;
^
foo.cc:5:10: warning: unused variable 'head' [-Wunused-variable]
char head,back,a[50];
^~~~
foo.cc:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d",&head1,&back2,&n);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:10:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%c",&a[i]);
~~~~~^~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务