sortbooks.cpp:28:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main () {
^
sortbooks.cpp: In function 'int main()':
sortbooks.cpp:54:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j=0; j<Query[i].size(); j++) {
~^~~~~~~~~~~~~~~~
sortbooks.cpp:29:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&q);
~~~~~^~~~~~~~~~~~~~
sortbooks.cpp:32:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&w[i]);
~~~~~^~~~~~~~~~~~
sortbooks.cpp:44:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&a[i],&b[i],&c[i]);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~