foo.cc: In function 'int main()':
foo.cc:19:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
19 | for (int i = 0; i < arr.length(); i++)
| ~~^~~~~~~~~~~~~~
foo.cc:33:13: warning: 'max_sp' may be used uninitialized [-Wmaybe-uninitialized]
33 | cout << max_sp << endl;
| ^~~~~~
foo.cc:15:10: note: 'max_sp' was declared here
15 | char max_sp;
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务