Accepted

foo.cc: In function ‘int main()’:
foo.cc:8:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
    8 |         for(int i=0;i<strlen(s);i++)
      |                     ~^~~~~~~~~~
foo.cc:9:22: warning: array subscript has type ‘char’ [-Wchar-subscripts]
    9 |                 a[s[i]]++;
      |                   ~~~^
foo.cc:11:22: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   11 |                 if(a[i]!=0)
      |                      ^
foo.cc:10:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
   10 |         for(char i='a';i<='z';i++)
      |         ^~~
foo.cc:13:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
   13 |                 cout<<endl;
      |                 ^~~~
foo.cc:15:22: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   15 |                 if(a[i]!=0)
      |                      ^
foo.cc:16:33: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   16 |                         cout<<a[i];
      |                                 ^
# 状态 耗时 内存占用
#1 Accepted 2ms 536.0 KiB
#2 Accepted 2ms 536.0 KiB
#3 Accepted 3ms 320.0 KiB

信息

递交者
类型
递交
比赛
2024.7.19暑期中级1班练习
语言
C++
递交时间
2024-07-20 08:51:45
评测时间
2024-07-20 08:51:45
评测机
分数
100
总耗时
9ms
峰值内存
536.0 KiB