lot.cpp: In function 'int main()':
lot.cpp:29:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while(k > qry[id].first && id < qry.size()) id++;
~~~^~~~~~~~~~~~
lot.cpp:30:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(id >= qry.size()) break;
~~~^~~~~~~~~~~~~
lot.cpp:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &l);
~~~~~^~~~~~~~~~~~~~~~~
lot.cpp:12:35: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i = 1; i <= n; i++) scanf("%d", &a[i]);
~~~~~^~~~~~~~~~~~~
lot.cpp:14:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &Q);
~~~~~^~~~~~~~~~
lot.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &k);
~~~~~^~~~~~~~~~