foo.cc: In function 'int main()':
foo.cc:7:13: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
    7 |         gets(s);s[strlen(s)]=s[strlen(s)-1];
      |         ~~~~^~~
In file included from /nix/store/jgdz5wfqc6q6qhy17lsqnfpbkfi1fcar-gcc-12.2.0/include/c++/12.2.0/cstdio:42,
                 from stdc++.h:46:
/nix/store/linb70pgp53f0kygxm5wk163dx22d681-glibc-2.37-45-dev/include/stdio.h:605:14: note: declared here
  605 | extern char *gets (char *__s) __wur __attribute_deprecated__;
      |              ^~~~
foo.cc:8:23: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
    8 |         for (int i=1;i<strlen(s);i++)
      |                      ~^~~~~~~~~~
foo.cc:12:31: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
   12 |                 for (int i=1;i<strlen(s)-1;i++){
      |                              ~^~~~~~~~~~~~
foo.cc:5:24: warning: variable 's1' set but not used [-Wunused-but-set-variable]
    5 |         char s[100010],s1[100010];
      |                        ^~
foo.cc:6:23: warning: unused variable 'flag' [-Wunused-variable]
    6 |         int j=0,sum=0,flag=0,t=0;
      |                       ^~~~
/nix/store/3r87a2wq1w4l66wnsm7rqvy608mx23h6-binutils-2.40/bin/ld: /tmp/ccX7anpu.o: in function `main':
foo.cc:(.text.startup+0xb): warning: the `gets' function is dangerous and should not be used.
   
  
    [Hydro](https://hydro.ac)提供评测服务