printer.cpp: In function 'bool operator<(Word, Word)':
printer.cpp:10:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0;i<a.s.size();i++)
~^~~~~~~~~~~
printer.cpp:13:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0;i<b.s.size();i++)
~^~~~~~~~~~~
printer.cpp:16:25: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
return ka<kb || ka==kb && a.s<b.s;
~~~~~~~^~~~~~~~~~
printer.cpp: At global scope:
printer.cpp:24:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main(){
^
printer.cpp: In function 'int main()':
printer.cpp:38:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0;i<word[0].s.size();i++) S=S+word[0].s[i];
~^~~~~~~~~~~~~~~~~
printer.cpp:43:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j=0;j<min(word[i-1].s.size(),word[i].s.size());j++)
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printer.cpp:48:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j=k;j<word[i].s.size();j++) S=S+word[i].s[j];
~^~~~~~~~~~~~~~~~~
printer.cpp:52:24: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d\n",S.size());
~~~~~~~~^
printer.cpp:53:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i=0;i<S.size();i++)
~^~~~~~~~~
printer.cpp:26:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
printer.cpp:28:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",ss); l=strlen(ss);
~~~~~^~~~~~~~~