printer.cpp: In function 'bool operator<(Word, Word)':
printer.cpp:17:25: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
return ka<kb || ka==kb && strcmp(a.s,b.s)<0;
~~~~~~~^~~~~~~~~~~~~~~~~~~~
printer.cpp: At global scope:
printer.cpp:25: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<strlen(word[0].s);i++) ans[lans++]=word[0].s[i];
~^~~~~~~~~~~~~~~~~~
printer.cpp:43:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j=0;j<min(strlen(word[i-1].s),strlen(word[i].s));j++)
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
printer.cpp:48:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j=k;j<strlen(word[i].s);j++) ans[lans++]=word[i].s[j];
~^~~~~~~~~~~~~~~~~~
printer.cpp:27:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
printer.cpp:29:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%s",word[i].s); l=strlen(word[i].s);
~~~~~^~~~~~~~~~~~~~~~