记录详情

Accepted

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)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 4ms 412.0 KiB
#2 Accepted 4ms 412.0 KiB
#3 Accepted 6ms 408.0 KiB
#4 Accepted 6ms 412.0 KiB
#5 Accepted 3ms 412.0 KiB
#6 Accepted 4ms 412.0 KiB
#7 Accepted 4ms 412.0 KiB
#8 Accepted 4ms 412.0 KiB
#9 Accepted 3ms 412.0 KiB
#10 Accepted 3ms 412.0 KiB

信息

递交者
类型
递交
题目
P1557 Problem 8B. 最多能消除的字符数
比赛
2023秋 悬赏令第八周
语言
C++
递交时间
2023-11-28 10:16:21
评测时间
2023-11-28 10:16:21
评测机
分数
100
总耗时
45ms
峰值内存
412.0 KiB