Accepted

foo.cc: In function 'int main(int, char**)':
foo.cc:4:29: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
    4 |     char s[101],i,j,k;gets(s);j=i=0;
      |                             ^
In file included from /usr/include/stdio.h:867,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:4:29: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
    4 |     char s[101],i,j,k;gets(s);j=i=0;
      |                             ^
In file included from /usr/include/stdio.h:867,
                 from foo.cc:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:235:1: note: declared here
  235 | gets (char *__str)
      | ^~~~
foo.cc:5:14: warning: array subscript has type 'char' [-Wchar-subscripts]
    5 |     while(s[j++]=s[i++])if(s[j-1]=='*')j--;
      |             ~^~
foo.cc:5:21: warning: array subscript has type 'char' [-Wchar-subscripts]
    5 |     while(s[j++]=s[i++])if(s[j-1]=='*')j--;
      |                    ~^~
foo.cc:5:17: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
    5 |     while(s[j++]=s[i++])if(s[j-1]=='*')j--;
      |           ~~~~~~^~~~~~~
foo.cc:4:21: warning: unused variable 'k' [-Wunused-variable]
    4 |     char s[101],i,j,k;gets(s);j=i=0;
      |                     ^
foo.cc:4:27: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result]
    4 |     char s[101],i,j,k;gets(s);j=i=0;
      |                       ~~~~^~~
/usr/bin/ld: /tmp/cc6kBVFE.o: in function `main':
foo.cc:(.text.startup+0x25): warning: the `gets' function is dangerous and should not be used.
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 256.0 KiB
#2 Accepted 1ms 384.0 KiB

信息

递交者
类型
递交
题目
P1105 删除指定字符
语言
C++
递交时间
2022-07-21 13:05:47
评测时间
2022-07-21 13:05:47
评测机
分数
100
总耗时
3ms
峰值内存
384.0 KiB