记录详情

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. 4ms 384.0 KiB
#4 Wrong Answer Standard answer longer than user output. 4ms 384.0 KiB
#5 Wrong Answer Read #i(出现了10次)nclude..., expect in. 6ms 384.0 KiB

信息

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