password.cpp: In function 'std::string guess(int, int)':
password.cpp:36:34: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
36 | for (; pref.size() + suf.size() < n; ) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
password.cpp:41:48: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
41 | for (int z = 1; z + pref.size() + suf.size() <= n;) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
password.cpp:55:37: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
55 | if (pref.size() + suf.size() + 1 == n) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
password.cpp:66:42: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
66 | }else if (pref.size() + suf.size() + 2 <= n){
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
password.cpp:97:32: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
97 | if (pref.size() + suf.size() == n) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
password.cpp:99:8: warning: unused variable 'Z' [-Wunused-variable]
99 | int Z = query(pref);
| ^
password.cpp:38:8: warning: variable 'LAST' set but not used [-Wunused-but-set-variable]
38 | char LAST = ((int)pref.size() ? pref.back() : 'a');
| ^~~~
password.cpp:35:7: warning: unused variable 'fs' [-Wunused-variable]
35 | char fs = 'a';
| ^~
password.cpp:104:6: warning: unused variable 'z' [-Wunused-variable]
104 | int z = query(pref);
| ^