printer.cpp: In function 'void add(std::string)':
printer.cpp:12:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
12 | for (int i=0;i<x.length();i++){
| ~^~~~~~~~~~~
printer.cpp: In function 'void final(int, char, int, int)':
printer.cpp:34:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
34 | if (mxs[lvl]!=char(i+'a')&&!ok||ok)final(trie[curr].ac[i],char(i+'a'),lvl+1,1);
printer.cpp: In function 'int main()':
printer.cpp:43:17: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
43 | if (s.length()>mxlen) mxlen=s.length(),mxs=s;
| ~~~~~~~~~~^~~~~~
printer.cpp:52:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
52 | for (int i=0;i<mxs.length()-1;i++){
| ~^~~~~~~~~~~~~~~
printer.cpp:58:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
58 | for (int i=0;i<ans.size();i++) cout<<ans[i]<<"\n";
| ~^~~~~~~~~~~
printer.cpp:53:36: warning: 'curr' may be used uninitialized in this function [-Wmaybe-uninitialized]
53 | int curr=trie[curr].ac[mxs[i]-'a'];
| ^