Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |         for(int len=1;len<=st.size();len++)
      |                       ~~~^~~~~~~~~~~
/in/foo.cc:10:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |                 for(int l=0,r=l+len-1;r<st.size()&&f;l++,r++)
      |                                       ~^~~~~~~~~~
/in/foo.cc:10:52: error: 'f' was not declared in this scope
   10 |                 for(int l=0,r=l+len-1;r<st.size()&&f;l++,r++)
      |                                                    ^

信息

递交者
类型
递交
题目
P3122 Where Am I?
语言
C++
递交时间
2026-05-31 17:36:21
评测时间
2026-05-31 17:36:21
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes