foo.cc: In function 'int main()':
foo.cc:18:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
18 | for (int i = 0; i < str.length(); i++)
| ~~^~~~~~~~~~~~~~
foo.cc:22:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for (j = 0, k = i; j < s0.length(); j++, k++)
| ~~^~~~~~~~~~~~~
foo.cc:25:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
25 | if(j == s0.length() && (k == str.length() || str[k] == ' '))
| ~~^~~~~~~~~~~~~~
foo.cc:25:39: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
25 | if(j == s0.length() && (k == str.length() || str[k] == ' '))
| ~~^~~~~~~~~~~~~~~
foo.cc:34:31: warning: 'p' may be used uninitialized in this function [-Wmaybe-uninitialized]
34 | cout << ans << " " << p <<endl;
| ^
[Hydro](https://hydro.ac)提供评测服务