记录详情

Wrong Answer

foo.cc: In function 'int main()':
foo.cc:14:19: warning: array subscript has type 'char' [-Wchar-subscripts]
   14 |         num[str[i]]++;
      |                   ^
foo.cc:15:22: warning: array subscript has type 'char' [-Wchar-subscripts]
   15 |         if(num[str[i]]>max){
      |                      ^
foo.cc:16:27: warning: array subscript has type 'char' [-Wchar-subscripts]
   16 |             max=num[str[i]];
      |                           ^
foo.cc:21:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |     for(int i=0;i<str.size();i++){
      |                 ~^~~~~~~~~~~
foo.cc:26:36: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   26 |         if(i<len||str[i]==maxletter&&i==len){
foo.cc:22:32: warning: 'maxletter' may be used uninitialized in this function [-Wmaybe-uninitialized]
   22 |         while(str[i]!=maxletter&&i<len){
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer Standard answer longer than user output. 5ms 384.0 KiB
#2 Wrong Answer Standard answer longer than user output. 4ms 384.0 KiB
#3 Wrong Answer Standard answer longer than user output. 3ms 384.0 KiB
#4 Wrong Answer Standard answer longer than user output. 2ms 396.0 KiB
#5 Wrong Answer Read #include<algorit..., expect in. 4ms 384.0 KiB

信息

递交者
类型
递交
题目
6-10 哪个字母对用得最多
比赛
2022暑期青少年社团(训练赛)
语言
C++
递交时间
2022-08-07 18:56:24
评测时间
2022-08-07 18:56:24
评测机
分数
0
总耗时
19ms
峰值内存
396.0 KiB