Accepted

foo.cc: In function 'int longestSubStr(std::string, int)':
foo.cc:21:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   21 |  if(k<2) return n; if(n<k) return 0;
      |  ^~
foo.cc:21:20: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   21 |  if(k<2) return n; if(n<k) return 0;
      |                    ^~
foo.cc:23:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   23 |     for(i=0;i<n;i++)ch[s[i]-'a']++;i=0;
      |     ^~~
foo.cc:23:36: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   23 |     for(i=0;i<n;i++)ch[s[i]-'a']++;i=0;
      |                                    ^
foo.cc:22:17: warning: unused variable 'm' [-Wunused-variable]
   22 |  int ch[26]={0},m=12,j,khu=2,l,fr=0;
      |                 ^
foo.cc:22:22: warning: unused variable 'j' [-Wunused-variable]
   22 |  int ch[26]={0},m=12,j,khu=2,l,fr=0;
      |                      ^
foo.cc:22:24: warning: unused variable 'khu' [-Wunused-variable]
   22 |  int ch[26]={0},m=12,j,khu=2,l,fr=0;
      |                        ^~~
foo.cc:22:30: warning: unused variable 'l' [-Wunused-variable]
   22 |  int ch[26]={0},m=12,j,khu=2,l,fr=0;
      |                              ^
foo.cc:22:32: warning: unused variable 'fr' [-Wunused-variable]
   22 |  int ch[26]={0},m=12,j,khu=2,l,fr=0;
      |                                ^~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Accepted 1ms 384.0 KiB
#2 Accepted 1ms 384.0 KiB
#3 Accepted 2ms 384.0 KiB
#4 Accepted 1ms 384.0 KiB

信息

递交者
类型
递交
题目
P1107 最长重复子串k
语言
C++
递交时间
2022-07-18 12:47:28
评测时间
2022-07-18 12:47:28
评测机
分数
100
总耗时
8ms
峰值内存
384.0 KiB