foo.cc: In function 'int magic_num(std::string)':
foo.cc:13:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
13 | for (int i = 0; i < s.size(); i++){
| ~~^~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:32:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
32 | for (int i = 0; i < s.size(); i++){
| ~~^~~~~~~~~~
foo.cc:33:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | for (int j = 0; j < s.size(); j++){
| ~~^~~~~~~~~~
foo.cc:37:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
37 | for (int i = 1; i < s.size(); i++){
| ~~^~~~~~~~~~
foo.cc:45:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for (int i = 0; i < s.size(); i++){
| ~~^~~~~~~~~~
foo.cc:46:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
46 | for (int j = i + 1; j < s.size(); j++){
| ~~^~~~~~~~~~
foo.cc:47:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
47 | for (int l = 0; l < s.size(); l++){
| ~~^~~~~~~~~~
foo.cc:48:43: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
48 | for (int r = l + 1; r < s.size(); r++){
| ~~^~~~~~~~~~
正在同步测试数据,请稍后
Found 20 testcases.
[Hydro](https://hydro.ac)提供评测服务